try this:
dim xml as xmldocument
dim r as string
if prettyFormat then
dim transformXSLT as string = "<xsl:stylesheet version='1.0'" +_
" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>" +_
"<xsl:output method='xml' indent='yes' />" +_
"<xsl:template match='*'>" +_
"<xsl:copy>" +_
"<xsl:copy-of select='@*' />" +_
"<xsl:apply-templates />" +_
"</xsl:copy>" +_
"</xsl:template>" +_
"<xsl:template match='comment()|processing-instruction()'>" +_
"<xsl:copy />" +_
"</xsl:template>" +_
"</xsl:stylesheet>"
r = xml.Transform(transformXSLT)
else
r = xml.ToString
end if
On May 29, 2009, at 8:37 AM, Charles E. Heizer wrote:
Hello,
Is there a function/class to format my XML output similar to Apple's
"NSXMLNodePrettyPrint"?
Thanks,
- Charles
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|