Pretty-printing output from javax.xml.transform.Transformer with only standard java api (Indentation and Doctype positioning)

前端 未结 4 1388
长发绾君心
长发绾君心 2020-11-27 02:39

Using the following simple code:

package test;

import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;

public class TestOutput         


        
4条回答
  •  无人及你
    2020-11-27 03:28

    You could probably prettify everything with an XSLT file. Google throws up a few results, but I can't comment on their correctness.

提交回复
热议问题