How to instantiate an empty element with JAXB

前端 未结 4 1446
-上瘾入骨i
-上瘾入骨i 2020-12-10 04:30

I use JAXB to create XML messages. The XML I need to create is (for the sake of simplicity):


  
4条回答
  •  时光说笑
    2020-12-10 04:59

    In XML,

    and
    are the same thing. If you really want the former, then use a prettifier. javax.xml.transform.TransformerFactory.newTransformer() will probably do that for you.

提交回复
热议问题