Community
    • Login

    Need help with xml document

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Joe MarshburnJ
      Joe Marshburn
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • cipher-1024C
        cipher-1024
        last edited by

        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.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors