If I have an XML document like
I want to get an XML string with the first child element. My output string would be
There are many approaches, would like to see some ideas. I've been trying to use Java XML APIs for it, but it's not clear that there is a good way to do this.
以上就是How do I extract child element from XML to a string in Java?的详细内容，更多请关注web前端其它相关文章！