Наследование: 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;
 }
Пример #4
0
 internal XmlFileInfoAttribute(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber   = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
 }
Пример #5
0
 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;
 }
Пример #8
0
 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;
 }