StAX XML formatting in Java

前端 未结 10 1419
-上瘾入骨i
-上瘾入骨i 2020-11-29 08:06

Is it possible using StAX (specifically woodstox) to format the output xml with newlines and tabs, i.e. in the form:


  
   someData
  &         


        
10条回答
  •  醉话见心
    2020-11-29 09:04

    If you're using the iterating method (XMLEventReader), can't you just attach a new line '\n' character to the relevant XMLEvents when writing to your XML file?

提交回复
热议问题