public virtual void parseElement(System.Xml.XmlNode oldEl, System.Xml.XmlNode newEl) { System.Xml.XmlNamedNodeMap nl = (System.Xml.XmlAttributeCollection)oldEl.Attributes; if (nl != null) { for (int i = 0; i < nl.Count; i++) { if (((System.Xml.XmlAttributeCollection)newEl.Attributes).GetNamedItem(nl.Item(i).Name) == null) { //System.out.println(nl.item(i).getNodeName()+" attribute not present, adding the attribute"); //UPGRADE_TODO: Method 'org.w3c.dom.Element.setAttribute' was converted to 'System.Xml.XmlElement.SetAttribute' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_orgw3cdomElementsetAttribute_javalangString_javalangString'" ((System.Xml.XmlElement)newEl).SetAttribute(nl.Item(i).Name, nl.Item(i).Value); } } } //UPGRADE_TODO: Method 'org.w3c.dom.Node.getChildNodes' was converted to 'System.Xml.XmlNode.ChildNodes' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'" System.Xml.XmlNodeList oldNodes = oldEl.ChildNodes; //UPGRADE_TODO: Method 'org.w3c.dom.Node.getChildNodes' was converted to 'System.Xml.XmlNode.ChildNodes' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'" System.Xml.XmlNodeList newNodes = newEl.ChildNodes; int i2 = 0; int j = 0; while (oldNodes.Item(i2) != null) { if (newNodes.Item(j) == null) { //System.out.println(oldNodes.item(i)+" not present, adding the whole element"); if (!ignoreList.Contains(oldNodes.Item(i2).Name)) { System.Xml.XmlNode n = newEl.OwnerDocument.ImportNode(oldNodes.Item(i2), true); newEl.AppendChild(n); } i2++; j++; } else { if ((System.Object)oldNodes.Item(i2).Name != (System.Object)newNodes.Item(j).Name) { if (!ignoreList.Contains(oldNodes.Item(i2).Name)) { //System.out.println(oldNodes.item(i)+" not present, adding the whole element"); System.Xml.XmlNode n = newEl.OwnerDocument.ImportNode(oldNodes.Item(i2), true); newEl.AppendChild(n); } i2++; } else { parseElement(oldNodes.Item(i2), newNodes.Item(j)); i2++; j++; } } } }
protected internal static void ParseExternalAttributes(System.Xml.XmlElement element, Field field) { System.Xml.XmlNamedNodeMap attributes = element.Attributes; for (int i = 0; i < attributes.Count; i++) { var attribute = (System.Xml.XmlAttribute)attributes.Item(i); if (attribute.NamespaceURI == null || attribute.NamespaceURI.Equals("") || attribute.NamespaceURI.Equals(XMLMessageTemplateLoader.TEMPLATE_DEFINITION_NS)) { continue; } field.AddAttribute(new QName(attribute.LocalName, attribute.NamespaceURI), attribute.Value); } }
static StackObject *GetNamedItem_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @name = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Xml.XmlNamedNodeMap instance_of_this_method = (System.Xml.XmlNamedNodeMap) typeof(System.Xml.XmlNamedNodeMap).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.GetNamedItem(@name); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
public XmlNamedNodeMap(XmlDocument owner, SystemXmlNamedNodeMap backingNamedNodeMap) { _owner = owner; _backingNamedNodeMap = backingNamedNodeMap; }