Re: Xml indent problem
- From: Joe Kesselman <keshlam-nospam@xxxxxxxxxxx>
- Date: Wed, 13 Sep 2006 19:19:21 -0400
Well, XSLT could be used, with a stylesheet that has its xsl:output directive set to indent (and possibly additional implementation-specific settings to say how much indentation to use; Xalan defaults to indenting by 0, for historical reasons). Or you could hand-code a stylesheet to track nesting depth and accomplish the same thing.
But I submit that you probably don't really want to do this. Changing the indentation of XML risks changing the _MEANING_ of the XML, since the indentation becomes part of the document's content.
What I would recommend, if you really want a tree view of your XML, is a real XML viewer. There are many Java implementations thereof available; it's quite easy for a Java hacker to make the standard Java tree views run against a DOM back-end.
.
- Follow-Ups:
- Re: Xml indent problem
- From: @cl
- Re: Xml indent problem
- References:
- Xml indent problem
- From: @cl
- Xml indent problem
- Prev by Date: Re: DOCBOOK document is broken
- Next by Date: Pass javascript variable to XSL
- Previous by thread: Xml indent problem
- Next by thread: Re: Xml indent problem
- Index(es):
Relevant Pages
|