Link to home
Start Free TrialLog in
Avatar of GeneBe
GeneBeFlag for United States of America

asked on

convert the xml POST response to a text file without the tagnames?

this is a VBscript  How do I convert the xml response to a text file without the tagnames?

Dim xml : xml = PostURL(HRP_BaseDomain & path, values)

Dim oXMLDoc, oXMLHTTP, oXMLResults, oXMLFields
Function PostURL(path, values)
   LogItem "path: " & HRP_BaseDomain & "   " &  path : LogError : Err.Clear
   On Error Resume Next
   set oXMLHTTP = createobject ("MSXML2.XMLHTTP.6.0")
   oXMLHTTP.open "POST", path, false
   oXMLHTTP.setRequestHeader "Content-type","application/x-www-form-urlencoded"
  oXMLHTTP.send values
   LogError : Err.Clear
   PostURL = oXMLHTTP.responseText
End Function

Open in new window

Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Show the response from this property:  oXMLHTTP.responseXML.xml

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms757055(v%3Dvs.85) 
Avatar of GeneBe

ASKER

this gives me an xml response. I need a text formatted response without the tags
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill Prew
Bill Prew

A sample of the output XML would be helpful, an answer may be driven by the structure and content of the XML, since XML can look a lot different between a simple schema and a very complex one.  With the XML sample a sample of the desired text output would be helpful.

You may be able to do something with an XSLT transformation, although I'm not very well skilled on that.  Take a look at this earlier question for an idea of that approach, but notice that to make it most useful it needs to know what the specific data looked liked, etc.



»bp
Avatar of GeneBe

ASKER

Please close this issue. your solution worked. thank you very much.