Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cleaning up XML with jTidy - inline elements ignored

843834Apr 29 2006 — edited Apr 30 2006
Dear all,

I am trying to use jTidy to clean up some XML that was generated in my application (i.e. "pretty-printing"). However, for some reason jTidy is treating my inline elements as structural elements. For example, the following is my source doc (where the <x> element is an inline element):
<?xml version="1.0" encoding="UTF-8"?>
<blub><bla>some text here<x />more text...</bla></blub>
jTidy output is this:
<?xml version="1.0" encoding="UTF-8"?>
<blub>
   <bla>some text here
   <x />

   more text...</bla>
</blub>
What I was expecting is this:
<?xml version="1.0" encoding="UTF-8"?>
<blub>
   <bla>some text here<x />more text...</bla>
</blub>
I have also pasted my jTidy properties file below. As you can see, I specified x as an inline element.
Any ideas where the problem might be?

Cheers,

N.
indent: auto
indent-spaces: 3
wrap: 7200
markup: yes
output-xml: yes
input-xml: yes
show-warnings: yes
numeric-entities: yes
quote-marks: yes
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
new-inline-tags: x
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2006
Added on Apr 29 2006
4 comments
455 views