Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Based on .XML file
Message
 
To
17/01/2006 14:59:14
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
01087698
Message ID:
01087746
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Hello,
>I have a Crystal Report that is based on an XML file. When I visually inspect the XML file, it looks fine, and it opens completely in IE without error. When I try to link it in my Crystal Report, I get an error. I think there might be something wrong with the structure of my XML file, but there are so many records I can't find it. Are there any Utils that I can run on it, or any other action I can take?
>
>TIA,
>MAC

One way to check the XML is to load it into DOM and see if DOM reports an error - if DOM does find an error - it will tell you the file position of the error in the XML. A day back I was getting errors. DOM does not like ampersands - so a STRTRAN "&" for "&" was required

Heres a way to do it from your command window:
oXML=CREATEOBJECT("MSXML2.DOMDocument.4.0") &&Explicit to 4.0
*ON ERROR: oXML=CREATEOBJECT("MSXML.DOMDocument") && Generic
oXML.async=.f.
oXML.setProperty("SelectionLanguage","XPath")
oXML.resolveExternals=.f.
oXML.loadXML(lcXML) && for file:oXML.load("xml.xml")
?oxml.parseError.reason && Reason for error
?oxml.parseError.filepos && where error is in your xml file/string
There is also a validate parse property
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform