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

Posted by Tattat on Stack Overflow See other posts from Stack Overflow or by Tattat
Published on 2010-05-11T12:05:58Z Indexed on 2010/05/13 9:54 UTC
Read the original article Hit count: 214

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>

© Stack Overflow or respective owner

Related posts about Xml

Related posts about editing