Java – xmleventwriter: how can I tell it to write empty elements?

I'm in javax xml. stream. Xmleventwriter or javax xml. stream. There is no option in xmloutputfactory. You can set a method to write empty elements (instead of explicit start and end element pairs)

I see woodstox has property to do this, but it's not standardized

Didn't I do anything obvious?

Solution

No< There is no semantic difference between X / > and < x > < / x > the standard API does not provide a way to request one or another

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>