I'd like to use the XmlTextWriter class, which is a .Net assembly in System.Xml.
I just can't figure out how to create the object from vlax-create-object, or if it's even possible.
Many thanks for any pointers!
Solved! Go to Solution.
I don't think thats possible, at least not directly. Using MSXML 6.0 DOMDocument objects through (vlax-create-object...) works just fine here.
The save method does just that - it saves the XML content, not add or modify elements, or format them (human-readable formatting like line breaks and tab-indents aren't really part of XML). You have to add the header elements yourself (check the methods on the DOMDocument object). As for making it human readable with "nice" line returns and tabs, consider adding TextElements with the CreateTextNode method with a newline and an appropriate number of tabs. For the most part, I don't bother with the latter; if I want to view the XML contents I add a stylesheet element pointing to a XSL stylesheet which transforms the XML to XHTML. Much easier on the eyes than raw XML
I never thought of adding the TextElements, thank you!
I have to admit, I think your answer was the most helpful response I've ever received, quite refreshing.
Start with some of our most frequented solutions to get help installing your software.