public override void WriteStartAttribute(string prefix, string localName, string ns) { // Save the name of the attribute if (localName != "xmlns" && prefix != "xmlns") { AttributeNode attributeNode = new AttributeNode(this.lexicon.TokenDictionary[ns][localName]); this.nodeStack.Push(attributeNode); } else { NamespaceNode namespaceNode = new NamespaceNode(prefix, localName, ns); this.nodeStack.Push(namespaceNode); } }
private void LoadNamespace(ElementNode elementNode) { foreach (Node childNode in elementNode) { if (childNode is NamespaceNode) { NamespaceNode namespaceNode = childNode as NamespaceNode; string namespacePrefix = namespaceNode.localName == "xmlns" ? string.Empty : namespaceNode.localName; this.xmlNamespaceManager.AddNamespace(namespacePrefix, namespaceNode.Value); } } this.xmlNamespaceManager.PushScope(); }