/// <summary> Visit RawDocument </summary>
 public override void VisitDocument(AXmlDocument document)
 {
     foreach(AXmlObject child in document.Children) {
         AXmlTag childAsTag = child as AXmlTag;
         // Only procssing instructions or elements
         if (childAsTag != null && childAsTag.IsProcessingInstruction && childAsTag.Name != "xml") {
             VisitTag(childAsTag);
         } else {
             AXmlElement childAsElement = child as AXmlElement;
             if (childAsElement != null) {
                 VisitElement(childAsElement);
             }
         }
     }
 }
Example #2
0
		/// <summary> Visit RawDocument </summary>
		public virtual void VisitDocument(AXmlDocument document)
		{
			foreach(AXmlObject child in document.Children) child.AcceptVisitor(this);
		}
 /// <summary> Create canonical text from a document </summary>
 public static string Print(AXmlDocument doc)
 {
     CanonicalPrintAXmlVisitor visitor = new CanonicalPrintAXmlVisitor();
     visitor.VisitDocument(doc);
     return visitor.Output;
 }
Example #4
0
 void ClearInternal()
 {
     this.UnknownEntityReferenceIsError = true;
     this.TrackedSegments = new TrackedSegmentCollection();
     this.userDocument = new AXmlDocument() { Parser = this };
     this.userDocument.Document = this.userDocument;
     // Track the document
     this.TrackedSegments.AddParsedObject(this.userDocument, null);
     this.userDocument.IsCached = false;
 }