Hi all!
I'm in the early stages of trying to import a financial file that is in XML into VFP9.
I am using this code from a prior post to open the xml file and view the data.
When I run the code, i get an error on the .LoadXML function:
XML Error: XML Parse error: The system cannot locate the object specified.
Line 0, Position 0.
I believe that it is because it cannot find the information in the XSI:schemaLocation web address.
When I manually type those addresses in my browser, I get the file not found pages.
Can I replace those web address with a local drive name ie: c:/edgar/documents/thirteenf eis_13FDocument.xsd and have the VFP code not crash?
I have the XSD and XLS files in this path.
Thanks!
I'm in the early stages of trying to import a financial file that is in XML into VFP9.
I am using this code from a prior post to open the xml file and view the data.
Code:
* Read the XML file into a memory variable
lcXML = FILETOSTR(GETFILE())
loXML = CREATEOBJECT("XMLAdapter")
* Convert XML to one or more cursor
WITH loXML
.LoadXML(lcXML)
FOR lnI = 1 TO .Tables.Count
lcCursorName = "SomeCursor" + TRANSFORM(lnI)
USE IN SELECT(lcCursorName)
.Tables(lnI).ToCursor(.F., lcCursorName)
ENDFOR
ENDWITH
When I run the code, i get an error on the .LoadXML function:
XML Error: XML Parse error: The system cannot locate the object specified.
Line 0, Position 0.
I believe that it is because it cannot find the information in the XSI:schemaLocation web address.
XML:
<informationTable xsi:schemaLocation="[URL unfurl="true"]http://www.sec.gov/edgar/document/thirteenf/informationtable[/URL] eis_13FDocument.xsd" xmlns="[URL unfurl="true"]http://www.sec.gov/edgar/document/thirteenf/informationtable"[/URL] xmlns:n1="[URL unfurl="true"]http://www.sec.gov/edgar/document/thirteenf/informationtable"[/URL] xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
When I manually type those addresses in my browser, I get the file not found pages.
Can I replace those web address with a local drive name ie: c:/edgar/documents/thirteenf eis_13FDocument.xsd and have the VFP code not crash?
I have the XSD and XLS files in this path.
Thanks!