I have following XML string.
<Engineers> <Engineer> <Name>JOHN</Name> <Position>STL</Position> <Team>SS</Team> </Engineer> <Engineer> <Name>UDAY</Name> <Position>TL</Position> <Team>SG</Team> </Engineer> <Engineer> <Name>INDRA</Name> <Position>Director</Position> <Team>PP</Team> </Engineer> </Engineers> I need to split this xml into smaller xml strings when Xpath is given as Engineers/Enginner.
Smaller xml strings are as follows
<Engineers> <Engineer> <Name>INDRA</Name> <Position>Director</Position> <Team>PP</Team> </Engineer> </Engineers> <Engineers> <Engineer> <Name>JOHN</Name> <Position>STL</Position> <Team>SS</Team> </Engineer> </Engineers> How can I do this using Java document builder and XpathFactory?
No comments:
Post a Comment