Removal of XML doc root node
843834Jun 11 2003 — edited Jun 11 2003What would be the most efficient way to remove just the root node element from an XML doc? The remainder of the document needs to be preserved.
I did not think XSLT would be appropriate given that not much processing needs to be done. Additional approaches I was thinking
about -
1) Manually stripping the root node using StringTokenizer.
2) With SAX, on startElement callback, echo the element and attributes to a StringBuffer if the element is not the root node.
Any advice would be appreciated. Thanks.