internal ExcCanonicalXml(XmlDocument document, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver) {
            if (document == null)
                throw new ArgumentNullException("document");

            m_c14nDoc = new CanonicalXmlDocument(true, includeComments);
            m_c14nDoc.XmlResolver = resolver;
            m_c14nDoc.Load(new XmlNodeReader(document));
            m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
        }
Ejemplo n.º 2
0
        internal CanonicalXml(XmlDocument document, XmlResolver resolver, bool includeComments) {
            if (document == null)
                throw new ArgumentNullException("document");

            m_c14nDoc = new CanonicalXmlDocument(true, includeComments);
            m_c14nDoc.XmlResolver = resolver;
            m_c14nDoc.Load(new XmlNodeReader(document));
            m_ancMgr = new C14NAncestralNamespaceContextManager();
        }
        internal ExcCanonicalXml(Stream inputStream, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver, string strBaseUri) {
            if (inputStream == null)
                throw new ArgumentNullException("inputStream");

            m_c14nDoc = new CanonicalXmlDocument(true, includeComments);
            m_c14nDoc.XmlResolver = resolver;
            m_c14nDoc.Load(Utils.PreProcessStreamInput(inputStream, resolver, strBaseUri));
            m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
        }
Ejemplo n.º 4
0
        internal CanonicalXml(XmlDocument document, bool includeComments)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }

            _c14nDoc = new CanonicalXmlDocument(true, includeComments);
            _c14nDoc.LoadXml(document.OuterXml);
            _ancMgr = new C14NAncestralNamespaceContextManager();
        }
 internal ExcCanonicalXml(Stream inputStream, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver, string strBaseUri)
 {
     if (inputStream == null)
     {
         throw new ArgumentNullException("inputStream");
     }
     this.m_c14nDoc             = new CanonicalXmlDocument(true, includeComments);
     this.m_c14nDoc.XmlResolver = resolver;
     this.m_c14nDoc.Load(System.Security.Cryptography.Xml.Utils.PreProcessStreamInput(inputStream, resolver, strBaseUri));
     this.m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
 }
 internal ExcCanonicalXml(XmlDocument document, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver)
 {
     if (document == null)
     {
         throw new ArgumentNullException("document");
     }
     this.m_c14nDoc             = new CanonicalXmlDocument(true, includeComments);
     this.m_c14nDoc.XmlResolver = resolver;
     this.m_c14nDoc.Load(new XmlNodeReader(document));
     this.m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
 }
 internal CanonicalXml(Stream inputStream, bool includeComments, XmlResolver resolver, string strBaseUri)
 {
     if (inputStream == null)
     {
         throw new ArgumentNullException("inputStream");
     }
     this.m_c14nDoc = new CanonicalXmlDocument(true, includeComments);
     this.m_c14nDoc.XmlResolver = resolver;
     this.m_c14nDoc.Load(System.Security.Cryptography.Xml.Utils.PreProcessStreamInput(inputStream, resolver, strBaseUri));
     this.m_ancMgr = new C14NAncestralNamespaceContextManager();
 }
Ejemplo n.º 8
0
        internal CanonicalXml(XmlDocument document, XmlResolver resolver, bool includeComments)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }

            _c14nDoc             = new CanonicalXmlDocument(true, includeComments);
            _c14nDoc.XmlResolver = resolver;
            _c14nDoc.Load(new XmlNodeReader(document));
            _ancMgr = new C14NAncestralNamespaceContextManager();
        }
Ejemplo n.º 9
0
        // private static string defaultXPathWithoutComments = "(//. | //@* | //namespace::*)[not(self::comment())]";
        // private static string defaultXPathWithoutComments = "(//. | //@* | //namespace::*)";
        // private static string defaultXPathWithComments = "(//. | //@* | //namespace::*)";
        // private static string defaultXPathWithComments = "(//. | //@* | //namespace::*)";

        internal CanonicalXml(Stream inputStream, bool includeComments, XmlResolver resolver, string strBaseUri)
        {
            if (inputStream == null)
            {
                throw new ArgumentNullException(nameof(inputStream));
            }

            _c14nDoc             = new CanonicalXmlDocument(true, includeComments);
            _c14nDoc.XmlResolver = resolver;
            _c14nDoc.Load(Utils.PreProcessStreamInput(inputStream, resolver, strBaseUri));
            _ancMgr = new C14NAncestralNamespaceContextManager();
        }
Ejemplo n.º 10
0
        internal ExcCanonicalXml(XmlNodeList nodeList, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver) {
            if (nodeList == null)
                throw new ArgumentNullException("nodeList");

            XmlDocument doc = Utils.GetOwnerDocument(nodeList);
            if (doc == null)
                throw new ArgumentException("nodeList");

            m_c14nDoc = new CanonicalXmlDocument(false, includeComments);
            m_c14nDoc.XmlResolver = resolver;
            m_c14nDoc.Load(new XmlNodeReader(doc));
            m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);

            MarkInclusionStateForNodes(nodeList, doc, m_c14nDoc);
        }
 internal ExcCanonicalXml(XmlNodeList nodeList, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver)
 {
     if (nodeList == null)
     {
         throw new ArgumentNullException("nodeList");
     }
     XmlDocument ownerDocument = System.Security.Cryptography.Xml.Utils.GetOwnerDocument(nodeList);
     if (ownerDocument == null)
     {
         throw new ArgumentException("nodeList");
     }
     this.m_c14nDoc = new CanonicalXmlDocument(false, includeComments);
     this.m_c14nDoc.XmlResolver = resolver;
     this.m_c14nDoc.Load(new XmlNodeReader(ownerDocument));
     this.m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
     MarkInclusionStateForNodes(nodeList, ownerDocument, this.m_c14nDoc);
 }
        internal ExcCanonicalXml(XmlNodeList nodeList, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver)
        {
            if (nodeList == null)
            {
                throw new ArgumentNullException("nodeList");
            }
            XmlDocument ownerDocument = System.Security.Cryptography.Xml.Utils.GetOwnerDocument(nodeList);

            if (ownerDocument == null)
            {
                throw new ArgumentException("nodeList");
            }
            this.m_c14nDoc             = new CanonicalXmlDocument(false, includeComments);
            this.m_c14nDoc.XmlResolver = resolver;
            this.m_c14nDoc.Load(new XmlNodeReader(ownerDocument));
            this.m_ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);
            MarkInclusionStateForNodes(nodeList, ownerDocument, this.m_c14nDoc);
        }
Ejemplo n.º 13
0
        internal CanonicalXml(XmlNodeList nodeList, bool includeComments)
        {
            if (nodeList == null)
            {
                throw new ArgumentNullException(nameof(nodeList));
            }

            XmlDocument doc = Utils.GetOwnerDocument(nodeList);

            if (doc == null)
            {
                throw new ArgumentException("nodeList");
            }

            _c14nDoc = new CanonicalXmlDocument(false, includeComments);
            _c14nDoc.LoadXml(doc.OuterXml);
            _ancMgr = new C14NAncestralNamespaceContextManager();

            MarkInclusionStateForNodes(nodeList, doc, _c14nDoc);
        }
Ejemplo n.º 14
0
        internal CanonicalXml(XmlNodeList nodeList, XmlResolver resolver, bool includeComments)
        {
            if (nodeList == null)
            {
                throw new ArgumentNullException("nodeList");
            }

            XmlDocument doc = Utils.GetOwnerDocument(nodeList);

            if (doc == null)
            {
                throw new ArgumentException("nodeList");
            }

            m_c14nDoc             = new CanonicalXmlDocument(false, includeComments);
            m_c14nDoc.XmlResolver = resolver;
            m_c14nDoc.Load(new XmlNodeReader(doc));
            m_ancMgr = new C14NAncestralNamespaceContextManager();

            MarkInclusionStateForNodes(nodeList, doc, m_c14nDoc);
        }
Ejemplo n.º 15
0
        internal ExcCanonicalXml(XmlNodeList nodeList, bool includeComments, string inclusiveNamespacesPrefixList, XmlResolver resolver)
        {
            if (nodeList == null)
            {
                throw new ArgumentNullException(nameof(nodeList));
            }

            XmlDocument doc = Utils.GetOwnerDocument(nodeList);

            if (doc == null)
            {
                throw new ArgumentException("nodeList");
            }

            _c14nDoc             = new CanonicalXmlDocument(false, includeComments);
            _c14nDoc.XmlResolver = resolver;
            _c14nDoc.Load(new XmlNodeReader(doc));
            _ancMgr = new ExcAncestralNamespaceContextManager(inclusiveNamespacesPrefixList);

            MarkInclusionStateForNodes(nodeList, doc, _c14nDoc);
        }