How to get the XML response already formatted by the browser?
Hello Comunity,
I'm having a problem related to the response rendered by IE (or any browser) and I hope you can help me out:
I have this code for retrieving a response from a request executed.
response = Aliases.WebAPIResultPage.WaitAliasChild("ResponsePage").innerText
Being "ResponsePage" is an object mapped (NameMapping) with WebAPIResultPage
Actually, the response is an XML response but it comes already formatted (see the dashes to collapse and expand) by the browser:
- <SCHEDREMOTE XMLNS="HTTP://FOO.COM/WEBSERVICES/">
- <RESPONSE>
- <RESOURCE>
<FIELD RESID="733" />
<FIELD DES="JUST A FOOOOO" />
- <EQUIP>
<FIELD STR1="" />
</EQUIP>
- <RES_USER>
<FIELD RESID="891" />
<FIELD USER1="" />
</RES_USER>
- <RES_LINK>
<FIELD RESID="460" />
<FIELD ISTRUCK="0" />
</RES_LINK>
</RESOURCE>
</RESPONSE>
</SCHEDREMOTE>
My question is, is there any way to get the XML (raw) only? The thing is that i want to parse the xml using:
Set xmlDoc = Createobject("MSXML2.DOMDocument")
xmlDoc.loadXML(response)
but in this format I can't.
Thanks in advance.
See if the contentText property is visible. that one might work for you.