Exemplo n.º 1
0
        public CqXmlDocument(IDomDocument document)
        {
            //var root = CreateElement("", "ROOT", "");
            CqXmlNode docNode = null;


            foreach (var child in document.ChildNodes)
            {
                var node = new CqXmlNode(this, child);
                if (node.NodeType == XmlNodeType.DocumentType)
                {
                    this.AppendChild(node);
                }
                else
                {
                    if (docNode == null)
                    {
                        docNode = new CqXmlNode(this, document);
                        this.AppendChild(docNode);
                    }
                    docNode.AppendChild(node);
                }
            }
        }
Exemplo n.º 2
0
        public CqXmlDocument(IDomDocument document)
        {
            //var root = CreateElement("", "ROOT", "");
            CqXmlNode docNode=null;
            

            foreach (var child in document.ChildNodes)
            {
                var node = new CqXmlNode(this, child);
                if (node.NodeType == XmlNodeType.DocumentType)
                {
                    this.AppendChild(node);
                }
                else
                {
                    if (docNode == null)
                    {
                        docNode = new CqXmlNode(this, document);
                        this.AppendChild(docNode);
                    }
                    docNode.AppendChild(node);
                }
            }
        }