Hi!
I recieve a XML-file wich I try to decode with the help of a XMLport. But so far I can’t even get past the xmlns-part of the message. This is the error I get:
The Namespace http://www.openapplications.org/oagis/9/currencycode/54217:2001 has not been defined at object.
How would the XMLport look like in the following example to make it work?
Is there somewhere I can read more to learn about this?
Example XML-file:
<?xml version="1.0" encoding="UTF-8"?>Example XMLport:
OBJECT XMLport 50000 Test
{
OBJECT-PROPERTIES
{
Date=07-11-07;
Time=15:51:12;
Modified=Yes;
}
PROPERTIES
{
Encoding=UTF-8;
Format/Evaluate=XML Format/Evaluate;
}
ELEMENTS
{
{ [{A5C08143-F414-4D6D-8D51-1671E9768F91}]; ;Test ;Element ;Text ;
Import::OnAfterAssignVariable=BEGIN
IF NOT CONFIRM(‘xmlns:clm54217:%1’,TRUE,“xmlns:clm54217”) THEN ERROR(‘Stop!’);
END;
}
{ [{C45FE8F5-2793-4732-8B6B-9CFA42275EA2}];1 ;xmlns:clm54217 ;Attribute;Text }
}
EVENTS
{
}
CODE
{
BEGIN
END.
}
}
Example calling codeunit:
OBJECT Codeunit 50000 Test_import_xml
{
OBJECT-PROPERTIES
{
Date=07-11-07;
Time=15:39:04;
Modified=Yes;
Version List=;
}
PROPERTIES
{
OnRun=VAR
f@1000000000 : File;
InS@1000000001 : InStream;
BEGIN
f.OPEN(‘C:\Temp\Test.xml’);
f.CREATEINSTREAM(InS);
XMLPORT.IMPORT(50000, InS);
f.CLOSE;
END;
}
CODE
{
BEGIN
END.
}
}
Any help is apriciated.
/K