상속: 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;
 }