I have this string:
<item>
<node1>Name</node1>
<childNode1>Nickname</childNode1>
<node2>Surname</node2>
</item>
<item>
<node1>AnotherName</node1>
<node2>AnotherSurname</node2>
</item>
I want to split this string by "item", and create a data structure from text extracted from all nodes, for example: {"Name","Nickname", "Surname"}
{"Name", "Surname"}
CodePudding user response:
While adding a root element, in order to create an XML might be better