     */
 
     func addElement(_ name: String, withAttributes attributes: [String: String], caseInsensitive: Bool) -> XMLElement {
-        let element = XMLElement(name: name, index: count, caseInsensitive: caseInsensitive, userInfo: userInfo)
+        let element = XMLElement(name: name, index: count, options: options)
         count += 1
 
         children.append(element)


    var count: Int = 0
    var index: Int

    var xmlChildren: [XMLElement] {
        return children.flatMap { $0 as? XMLElement }

        // clear any prior runs of parse... expected that this won't be necessary,
        // but you never know
        parentStack.removeAll()
        parentStack.push(root)

        self.ops = ops
