XML Object
 
When creating XML for interchanging data with a provider using standard definitions, you need to validate the construct and data against a XML Schema Definition (xsd) file.
 
TRADIUM Basic Script has a command ValidateXML to check the XML data, using such a .xsd file:
 
Sub Main
 
   Dim Result As String
 
   XML.Clear
   XML.NewChild "CustomerID", "Test"
 
   Result = ValidateXML(XML.GetXml, "o:\adminsql\EDI\Orders.xsd")
 
   If Result = "OK" Then
      Msgbox "The XML data is valid!", mbInformation
   Else
      Msgbox "The XML data is invalid:" & vbNewLine & Result, mbExclamation
   End If
 
End Sub