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/"><?xml version = '1.0'?><USER><ROW num="1"><USER_ID>25214</USER_ID><LOGIN_ID>JDOE</LOGIN_ID><NAME_LAST>JOHN</NAME_LAST><NAME_FIRST>DOE</NAME_FIRST><NAME_MI>Q</NAME_MI><NAME_FI>A</NAME_FI><EMAIL>john.doe@email.com</EMAIL><OFFICE_PHONE>5551212</OFFICE_PHONE><OFFICE_STREET1>123 Main Street</OFFICE_STREET1></ROW> </USER> ( etc )</getAllUserInfoReturn></ns1:getAllUserInfoResponse></soapenv:Body></soapenv:Envelope>
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?