473,378 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

DOM output xml format.

Does anybody know how to make DOM to output (transform) XML file in decent
format. Now it put everything in one line. :(
Rgds,

Jun
Jul 20 '05 #1
2 3309

"Bell" <ju********@sympatico.ca> wrote in message
news:NA*******************@news20.bellglobal.com.. .
Does anybody know how to make DOM to output (transform) XML file in decent
format. Now it put everything in one line. :(

<xsl:output indent="yes" ...

or, in Java,

Transformer transformer ...

transformer.setOutputProperty("indent","yes");

Regards,
Daniel Parker
http://servingxml.sourceforge.net/

Jul 20 '05 #2
Thank Daniel. But this property only wraps each element in new line. It
does not provide a decent format for multiple level elements like :
<root>
< branch >
<leaf/>
</branch>
</root>

Any easy way to achieve this?

Rgds,

Jun

"Daniel Parker" <danielaparker@spam?nothanks.windupbird.com> wrote in
message news:4N*******************@news20.bellglobal.com.. .

"Bell" <ju********@sympatico.ca> wrote in message
news:NA*******************@news20.bellglobal.com.. .
Does anybody know how to make DOM to output (transform) XML file in decent format. Now it put everything in one line. :(

<xsl:output indent="yes" ...

or, in Java,

Transformer transformer ...

transformer.setOutputProperty("indent","yes");

Regards,
Daniel Parker
http://servingxml.sourceforge.net/

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sebastien de Menten | last post by:
Hi, I am using the profile module to watch hot spots in a python application. The default output is already useful but has anyone tried to produce output readable by kcachegrind...
4
by: newbiecpp | last post by:
How can I format output string. For example, when I use: Console.WriteLine("12345") I want to output like " 12345", i.e., I need set width is 10 and align at right. How can I do it. ...
32
by: spibou | last post by:
Is the output of the C preprocessor deterministic ? What I mean by that is , given 2 compilers which conform to the same standard, will their preprocessors produce identical output given as input...
1
by: nriley | last post by:
Hi, I've got a number of doctests which rely on a certain output format, and since I wrote the tests I've changed the output format. Now, almost all the tests fail. What I'd like is if I...
11
by: aljaber | last post by:
hi, i am facing a problem with my program output here is the program /*********************************************\ * CD Database * * ...
0
by: surya926 | last post by:
Hello I am loading one input xml file and after manipulating the xml file the data should update in that xml file and returns the updated xml file as a output. Here my problem is i am using...
2
by: johnperl | last post by:
i am working on the script as below, i want an output according to the format. i am trying to put everything in one loop but cannot figure out the way to do so. could anyone please help me with this....
1
by: CAM123 | last post by:
I have added: <br><xsl:value-of select="Line" /></br> to my XSLT stylesheet to get a line per repeating block. When I view the output as XML it looks perfect - one line per block. However...
5
by: amit.uttam | last post by:
Hey everyone, I've recently jumped big time into python and I'm working on a software program for testing automation. I had a question about proper logging of output. What I would like is: 1....
8
by: victor.herasme | last post by:
Hi, i am building a little script and i want to output a series of columns more or less like this: 1 5 6 2 2 8 2 9 5 The matter is that i don't know in advance how many columns...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.