Inheritance: System.Xml.XmlDocument
示例#1
0
        private XmlNode CreateCloneInTargetDocument(XmlNode sourceNode)
        {
            XmlFileInfoDocument fileInfoDocument = this.TargetDocument as XmlFileInfoDocument;
            XmlNode             node             = fileInfoDocument == null?this.TargetDocument.ReadNode((XmlReader) new XmlTextReader((TextReader) new StringReader(sourceNode.OuterXml))) : fileInfoDocument.CloneNodeFromOtherDocument(sourceNode);

            this.ScrubTransformAttributesAndNamespaces(node);
            return(node);
        }
示例#2
0
        public static void Format(XmlDocument document)
        {
            XmlFileInfoDocument document1 = document as XmlFileInfoDocument;

            if (document1 == null)
            {
                return;
            }
            new XmlFormatter(document1).FormatLoop((XmlNode)document1);
        }
示例#3
0
 private XmlFormatter(XmlFileInfoDocument document)
 {
     this.document         = document;
     this.originalFileName = document.FileName;
 }
 internal XmlFileInfoAttribute(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber   = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
 }
 internal XmlFileInfoElement(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber   = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
     this.isOriginal   = document.FirstLoad;
     if (document.PreservationProvider != null)
     {
         this.preservationDict = document.PreservationProvider.GetDictAtPosition(this.lineNumber, this.linePosition - 1);
     }
     if (this.preservationDict != null)
     {
         return;
     }
     this.preservationDict = new XmlAttributePreservationDict();
 }
 internal XmlFileInfoElement(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
     this.isOriginal = document.FirstLoad;
     if (document.PreservationProvider != null)
         this.preservationDict = document.PreservationProvider.GetDictAtPosition(this.lineNumber, this.linePosition - 1);
     if (this.preservationDict != null)
         return;
     this.preservationDict = new XmlAttributePreservationDict();
 }
 internal XmlFileInfoAttribute(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
 }
 private XmlFormatter(XmlFileInfoDocument document)
 {
     this.document = document;
     this.originalFileName = document.FileName;
 }
        private string ConvertUriToFileName(XmlDocument xmlDocument)
        {
            XmlFileInfoDocument fileInfoDocument = xmlDocument as XmlFileInfoDocument;

            return(this.ConvertUriToFileName(fileInfoDocument == null ? fileInfoDocument.BaseURI : fileInfoDocument.FileName));
        }
 public XmlNodeException(string message, XmlNode node)
     : base(message)
 {
     this.lineInfo = node as IXmlLineInfo;
     this.document = node.OwnerDocument as XmlFileInfoDocument;
 }
 public XmlNodeException(Exception innerException, XmlNode node)
     : base(innerException.Message, innerException)
 {
     this.lineInfo = node as IXmlLineInfo;
     this.document = node.OwnerDocument as XmlFileInfoDocument;
 }
示例#12
0
 public XmlNodeException(string message, XmlNode node)
     : base(message)
 {
     this.lineInfo = node as IXmlLineInfo;
     this.document = node.OwnerDocument as XmlFileInfoDocument;
 }
示例#13
0
 public XmlNodeException(Exception innerException, XmlNode node)
     : base(innerException.Message, innerException)
 {
     this.lineInfo = node as IXmlLineInfo;
     this.document = node.OwnerDocument as XmlFileInfoDocument;
 }