Need help with xml document



  • Here’s part of it. So, im wondering how do I remove everything from the doc except for the body="…" parts en masse? There are about 7000 entries like the one in the screenshot. Thanks.



  • Dude. The answers that the other people on this board can give can be phenomenal if you give them a clear idea of what you’re trying to do and what you have to work with. Posting a picture of XML instead of actual XML is almost mean. /chastisement. :)

    It seems like you just want the contents of the body tag and you don’t need it to be in XML format. If that’s the case you can load the “XML Tools” plugin and do an “Evaluate XPath expression”. For instance if my XML looks like this:
    <table>
    <sms protocol=“0” date=“12.12.121.1” type=“1” subject=“null” body=“this is some stuff” ></sms>
    <sms protocol=“1” date=“12.12.121.2” type=“1” subject=“null” body=“this is some stuff” ></sms>
    <sms protocol=“2” date=“12.12.121.3” type=“1” subject=“null” body=“this is some stuff” ></sms>
    <sms protocol=“3” date=“12.12.121.4” type=“1” subject=“null” body=“this is some stuff” ></sms>
    </table>

    I can put in /table/sms/@body and click the evaluate button in the XPath Expression Evaluation window and it will give me all the body attribute contents and I can copy them to the clipboard.

    If that’s not what you’re looking for, you may have to give a little more detail and maybe a bigger chunk of your XML.


Log in to reply