Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
XML Support in 4.0
Currently, XML is not supported in 4.0.0 due to lack of Mac support. An updated parser is being created that supports Mac and Windows, but in order to avoid future breaking changes,
ConvertToXml are not currently implemented.
To use XML in Windows in the meantime, follow these steps:
1. Create XML Converter
In a new or existing module, add the following:
' ModuleName.bas Public Function ParseXml(Value As String) As Object Set ParseXml = CreateObject("MSXML2.DOMDocument") ParseXml.Async = False ParseXml.LoadXML Value End Function Public Function ConvertToXml(Value As Variant) As String ConvertToXml = Trim(Replace(Value.Xml, vbCrLf, "")) End Function
2. Register XML Converter
Register converter before it is used in
WebHelpers.RegisterConverter "xml", "application/xml", "ModuleName.ConvertToXml", "ModuleName.ParseXml"
3. Use XML Converter in
Request.CustomRequestFormat = "xml" Request.CustomResponseFormat = "xml"