/// <summary> /// Populates the document with xml from specified xml document. /// </summary> /// <param name="copyDocument">The file to copy.</param> public void loadDocument(NSFXMLDocument copyDocument) { rootElement = null; bookmarkElement = null; currentElement = null; if (copyDocument.rootElement != null) { rootElement = new NSFXMLElement(copyDocument.rootElement); bookmarkElement = rootElement; currentElement = rootElement; } }
/// <summary> /// Adds an xml document to the front of the current element's child elements /// </summary> /// <param name="document">The document to add.</param> /// <returns>True if successful, false otherwise.</returns> public bool addChildElementFront(NSFXMLDocument document) { if (document.rootElement == null) { errorStatus = ErrorStatus.EmptyElement; return(false); } if (rootElement == null) { rootElement = new NSFXMLElement(document.rootElement); currentElement = rootElement; bookmarkElement = rootElement; } else { currentElement.addChildElementFront(new NSFXMLElement(document.rootElement)); } return(true); }
/// <summary> /// Creates an xml document. /// </summary> /// <param name="copyDocument">The document to copy.</param> public NSFXMLDocument(NSFXMLDocument copyDocument) { loadDocument(copyDocument); }