Hello,
I want to import a XML file with a new XML-port. More then one of the element names has in the name the prefix : (example : <nl:Staffing>).
When I start the import with this code:
TESTFILE.OPEN('c:\TEST.XML');
TESTFILE.CREATEINSTREAM(TESTSTREAM);
XMLPORT.IMPORT(50002,TESTSTREAM);
TESTFILE.CLOSE
i got the error "The XML-parser returns the folowing fatal error:
Undeclared prefix.
Line number = 15 Cloumn number = 37.
if I delete the prefix : in the element names, the import is succesfull.
Does anyone know how to solve the problem with the prefix : in the element names
Thanks
0
Answers
Is the XMLPort even vaiable as an option or should I just breakdown and learn how to use the DOM?
<?xml version="1.0" encoding="utf-8"?>
<ENV:Envelopes>
<ENV:SenderID>PMK</ENV:SenderID>
<ENV:RecipientID>LXD</ENV:RecipientID>
<ENV:DocumentCount>1</ENV:DocumentCount>
</ENV:Envelopes>
The solution I've used is to remove the : before the import the XML using some File commands.
There is a good example here by jreynolds.
http://www.mibuso.com/forum/viewtopic.php?f=23&t=29313&p=146950#p146950
Works a treat.