7 Replies Latest reply on May 29, 2014 6:34 AM by BreakawayPaul

    How do I deal with an XML file that uses html characters?

    BreakawayPaul Level 2

      I need to pull a userlist for my web app, and that involves invoking a web service on the authentication server.  I've managed to do just that, but the XML file I'm given to deal with looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body><ns1:getAllUserInfoResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://web.ws">
      <getAllUserInfoReturn xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      &lt;?xml version = '1.0'?&gt;
      &lt;ROW num=&quot;1&quot;&gt;
      &lt;OFFICE_STREET1&gt;123 Main Street&lt;/OFFICE_STREET1&gt;
      &lt;/ROW&gt; &lt;/USER&gt; 
      ( etc )


      I need to loop through this and get usernames, ids, rights, etc, but with it looking like that, I have my work cut out for me (I think).  I'm not sure if there's an easy way to replace entities in an XML file (the docs seem to be down), and if there is, I don't know about it.


      Any ideas?