Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
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);
        }