I got an Xml file fileOri.xml and there are some lines like
<SubItem name='somename' value='someVal'></SubItem>
and I plan to copy these lines to another file fileDes.xml. Is there a rapidly & easily way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Adding to Rajs answer, here’s how you can do it using Transform:
The code
The Stylesheet
Doing it via Transformation gives you the flexibility to change the content you like to copy without touching the executable in the future – just modify the Xslt to your needs.
Hint
Your question suggests that you probably rather want a flat text file with line items for further processing – in that case you can still use Xslt but with text output.