Ejemplo n.º 1
0
        internal CanonicalXml(XmlNodeList nodeList, XmlResolver resolver, bool includeComments)
        {
            if (nodeList == null)
            {
                throw new ArgumentNullException(nameof(nodeList));
            }
            XmlDocument ownerDocument = Exml.GetOwnerDocument(nodeList);

            if (ownerDocument == null)
            {
                throw new ArgumentException(nameof(nodeList));
            }
            m_c14nDoc             = new CanonicalXmlDocument(false, includeComments);
            m_c14nDoc.XmlResolver = resolver;
            m_c14nDoc.Load(new XmlNodeReader(ownerDocument));
            m_ancMgr = new C14NAncestralNamespaceContextManager();
            MarkInclusionStateForNodes(nodeList, ownerDocument, m_c14nDoc);
        }
Ejemplo n.º 2
0
        internal ExcCanonicalXml(
            XmlNodeList nodeList,
            bool includeComments,
            string inclusiveNamespacesPrefixList,
            XmlResolver resolver)
        {
            if (nodeList == null)
            {
                throw new ArgumentNullException(nameof(nodeList));
            }
            XmlDocument ownerDocument = Exml.GetOwnerDocument(nodeList);

            if (ownerDocument == null)
            {
                throw new ArgumentException(nameof(nodeList));
            }
            this.m_c14nDoc             = new CanonicalXmlDocument(false, includeComments);
            this.m_c14nDoc.XmlResolver = resolver;
            this.m_c14nDoc.Load((XmlReader) new XmlNodeReader((XmlNode)ownerDocument));
            this.m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
            ExcCanonicalXml.MarkInclusionStateForNodes(nodeList, ownerDocument, (XmlDocument)this.m_c14nDoc);
        }