Note that there are some explanatory texts on larger screens.

plurals
  1. POConfigurable XML pretty printer for java
    primarykey
    data
    text
    <p>I need to format an xhtml file which has some elements included in a different namespace.</p> <p>I have searched a whole day for a really good mechanism for pretty printing an xml file in java. I have tested </p> <ul> <li>dom4j</li> <li>jdk (xerxes)</li> <li>my own xslt file</li> <li>jtidy </li> </ul> <p>I am missing a really good formatter with the following options:</p> <ol> <li>setting line-width</li> <li>wrapping attributes if maximum line-width reached</li> <li>alternative: aligning all attributes </li> <li>option for empty elements to include white-space before closing tag <code>&lt;br/&gt;</code> vs <code>&lt;br /&gt;</code></li> <li>give element names where white-space is not significant</li> </ol> <p>After my research I concluded to run my own xslt stylesheet, but I think you can't do 2. or 3. and I had no success with 4. too. </p> <p>Of course line-width can be forced when white-space is significant and so on. But isn't there any lib which can do what I want?</p> <p>Do you have any suggestion for me?</p> <p><strong>UPDATE:</strong> I really search the net for a good xml beautifier/pretty printer. Nothing found. Eclipse is doing a good job but I dont know how to extract the component from its core. There must be something like this out there. At the moment I am writing my own :-(</p> <p>Eclipse has lot of options:</p> <p><img src="https://i.stack.imgur.com/ksAPo.png" alt="enter image description here"></p> <p>Something like this as a library would be nice.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload