I have to write values as below by reading the values from a text file
Text File:
123|John
XML file to generate:
<Member>
<Person Type="ID">123</Person>
<Person Type="Name">John</Person>
</Member>
XAPTH I am using:
For writing the value for attribute value ID
/Member/Person[@Type="ID"]
For writing the value for attribute value Name
/Member/Person[@Type="Name"]
But in the output, I am getting the XML file as
<Member>
<Person Type="ID">
123
John
</Person>
<Member>
Attribute value "Name" is missing
Any help is much appreciated