Stream(System.Xml.XmlNode node)
        {
            m_dataObjs.Add(new Snoop.Data.ClassSeparator(typeof(System.Xml.XmlNode)));

            m_dataObjs.Add(new Snoop.Data.String("Node type", node.NodeType.ToString()));
            m_dataObjs.Add(new Snoop.Data.String("Name", node.Name));
            m_dataObjs.Add(new Snoop.Data.String("Local name", node.LocalName));
            m_dataObjs.Add(new Snoop.Data.String("Value", node.Value));
            m_dataObjs.Add(new Snoop.Data.Bool("Has child nodes", node.HasChildNodes));
            m_dataObjs.Add(new Snoop.Data.String("Inner text", node.InnerText));
            m_dataObjs.Add(new Snoop.Data.Xml("Inner XML", node.InnerXml, false));
            m_dataObjs.Add(new Snoop.Data.Xml("Outer XML", node.OuterXml, false));
            m_dataObjs.Add(new Snoop.Data.Bool("Is read only", node.IsReadOnly));
            m_dataObjs.Add(new Snoop.Data.String("BaseURI", node.BaseURI));
            m_dataObjs.Add(new Snoop.Data.String("Namespace URI", node.NamespaceURI));
            m_dataObjs.Add(new Snoop.Data.String("Prefix", node.Prefix));

            // branch to all known major sub-classes
            System.Xml.XmlAttribute att = node as System.Xml.XmlAttribute;
            if (att != null)
            {
                Stream(att);
                return;
            }

            System.Xml.XmlDocument doc = node as System.Xml.XmlDocument;
            if (doc != null)
            {
                Stream(doc);
                return;
            }

            System.Xml.XmlDocumentFragment docFrag = node as System.Xml.XmlDocumentFragment;
            if (docFrag != null)
            {
                Stream(docFrag);
                return;
            }

            System.Xml.XmlEntity ent = node as System.Xml.XmlEntity;
            if (ent != null)
            {
                Stream(ent);
                return;
            }

            System.Xml.XmlNotation notation = node as System.Xml.XmlNotation;
            if (notation != null)
            {
                Stream(notation);
                return;
            }

            System.Xml.XmlLinkedNode lnkNode = node as System.Xml.XmlLinkedNode;
            if (lnkNode != null)
            {
                Stream(lnkNode);
                return;
            }
        }
        Stream(System.Xml.XmlEntity ent)
        {
            m_dataObjs.Add(new Snoop.Data.ClassSeparator(typeof(System.Xml.XmlEntity)));

            m_dataObjs.Add(new Snoop.Data.String("Notation name", ent.NotationName));
            m_dataObjs.Add(new Snoop.Data.String("Public ID", ent.PublicId));
            m_dataObjs.Add(new Snoop.Data.String("System ID", ent.SystemId));
        }
Ejemplo n.º 3
0
 internal DtdEntity(XmlDocument owner, SystemXmlEntity backingEntity)
 {
     _owner         = owner;
     _backingEntity = backingEntity;
 }