D
D-Dog
Hi,
I'm just getting started with XML and have been trying to write out
my xml document to a file. The data itself looks correct, but I have
two formatting questions:
1. Each tag has a 'word:' appended to the beginning of it. For
example:
<word:Comment> ............................. </word:Comment>
How do I remove the 'word:' from the front of each tag? It's like that
for all of them.
2. Try as I might, I have not been able to get indenting to work.
I've searched the net in vain, and all tell me to set the following
properties on my transformer:
transformer.setOutputPropety(OutputKeys.INDENT,"yes");
transformer.setOutputPropety("{http://xml.apache.org/xslt}indent-amount","4");
Unfortunately, all of the tags continue to be lined up along the left
side with no indenting. Am I missing something? I snipped out the
rest of the code that sets up the transformer so as not to clutter this
post, but if you need more info, I will repost it.
Thank you very much for any help you can provide.
Dennis
I'm just getting started with XML and have been trying to write out
my xml document to a file. The data itself looks correct, but I have
two formatting questions:
1. Each tag has a 'word:' appended to the beginning of it. For
example:
<word:Comment> ............................. </word:Comment>
How do I remove the 'word:' from the front of each tag? It's like that
for all of them.
2. Try as I might, I have not been able to get indenting to work.
I've searched the net in vain, and all tell me to set the following
properties on my transformer:
transformer.setOutputPropety(OutputKeys.INDENT,"yes");
transformer.setOutputPropety("{http://xml.apache.org/xslt}indent-amount","4");
Unfortunately, all of the tags continue to be lined up along the left
side with no indenting. Am I missing something? I snipped out the
rest of the code that sets up the transformer so as not to clutter this
post, but if you need more info, I will repost it.
Thank you very much for any help you can provide.
Dennis