Is there any way to get the combine two xml into one xml in Linux.

Posted by user28167 on Super User See other posts from Super User or by user28167
Published on 2010-05-11T12:05:58Z Indexed on 2010/05/11 12:14 UTC
Read the original article Hit count: 249

Filed under:
|
|

XML one is something like that:

<dict>
    <key>2</key>
    <array>
        <string>A</string>
        <string>B</string>
    </array>
    <key>3</key>
    <array>
        <string>C</string>
        <string>D</string>
        <string>E</string>
    </array>
</dict>      

XML Two is something like that:

<dict>
    <key>A</key>
    <array>
        <string>A1</string>
        <false/>
        <false/>
        <array>
            <string>Apple</string>
            <string>This is an apple</string>
        </array>
        <array>
            <string>Apple Pie</string>
            <string>I love Apple Pie.</string>
        </array>
    </array>
    <key>B</key>
    <array>
        <string>B7</string>
        <false/>
        <false/>
        <array>
            <string>Boy</string>
            <string>I am a boy.</string>
        </array>
    </array>
</dict>

I want to convert to this:

<dict>
    <key>2</key>
    <array>
        <string>A, Apple, Apple Pie</string>
        <string>B, Boy</string>
    </array>
    ...
</dict>

© Super User or respective owner

Related posts about Xml

Related posts about linux