[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Line Breaks and formatting
[Karl Stubsjoen] > I'm using vb and the MSXML2 object model to create XML documents in code. > I've noticed that the XML is constructed all on one line... I'd like to > somehow insert line breaks (and possibly add other formating like tabs), > into my XML while creating with MSXML2. Is this possible? Not without writing a bunch of custom code. You are really talking about pretty-printing, right? Most processing systems provide some kind of prettyprinting, but not that would do everything you ask for. That is a job for either a special serializer or for some post-processing after the serializer emits the xml. To put it another way, prettyprinters usually do not wrap lines, so you would have to add that ability or do it in postprocessing. Of course, if your xml is simple and you know where line breaks should go, you may be able to insert them into element character data as you create it, before putting it into an element. If you use attributes to hold the text, you have to expect your line feeds and tabs to get normalized away. Cheers, Tom P
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|