How do I insert XML into another XML file with XSLT?

Posted by Sandra on Stack Overflow See other posts from Stack Overflow or by Sandra
Published on 2010-05-25T17:55:39Z Indexed on 2010/05/25 18:01 UTC
Read the original article Hit count: 173

Filed under:
|
|

Hello,

I looked at this thread to find out how to insert XML into XML with XSLT http://stackoverflow.com/questions/862954/insert-xml-node-at-a-specific-position-of-an-existing-document

But I have a problem since I need to insert XML between two grand child nodes. For example I want to insert <s>...</s> between <r>...</r> and <t>...</t> in this file

<root>
  <child1>
    <a>...</a>
    <r>...</r>
    <t>...</t>
    <z>...</z>
  </child1>
</root>

to create this file

<root>
  <child1>
    <a>...</a>
    <r>...</r>
    <s>...</s>
    <t>...</t>
    <z>...</z>
  </child1>
</root>

Thanks for your help.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xslt