VBA-tools / VBA-Web

VBA-Web: Connect VBA, Excel, Access, and Office for Windows and Mac to web services and the web
http://vba-tools.github.io/VBA-Web/
MIT License
2.01k stars 494 forks source link

Having trouble getting XML parsing working in Windows #142

Closed Quadrature closed 9 years ago

Quadrature commented 9 years ago

I have followed the instructions outlined in https://github.com/VBA-tools/VBA-Web/wiki/XML-Support-in-4.0 but when I debug, the function in WebHelpers:

Public Function ParseXml(Encoded As String) As Object

is getting called by WebHelpers.ParseByFormat

Case WebFormat.Xml Set ParseByFormat = ParseXml(Value)

Any guidance on how to apply the 4.0 workaround? Please forgive if this is not the appropriate place to post questions of this nature.

Regards - Alan Josephson

timhall commented 9 years ago

Hi @Quadrature after setting up the custom formatter, you use it as follows:

' The following uses the built-in XML converter (which is disabled currently)
' X Request.Format = WebFormat.Xml

' Use the custom XML formatter with the following
Request.CustomRequestFormat = "xml"
Request.CustomResponseFormat = "xml"

' The above automatically set the following
Request.Format = WebFormat.Custom

Let me know if that still isn't working for you.

SLiX69 commented 8 years ago

Hi @timhall, would you provide some more details, on how to set up the xml converter?

1. Create XML Converter - seems clear to me

2. Register XML Converter - is not that clear. Set 'ModuleName' to module name created in first step. But in which module I have to set this line?

3. Use XML Converter in WebRequest - isn't that clear, too. Am I right to set this those lines eg. here maps example