Beispiel #1
0
        //
        // Input documents management
        //

        internal static XPathDocument LoadDocument(XmlTextReader reader)
        {
            XmlValidatingReader vr = XPathDocument.CreateHelperValidatingReader(reader);

            try {
                return(new XPathDocument(vr, XmlSpace.Preserve));
            }
            finally {
                vr.Close();
                reader.Close();
            }
        }