Problem with XML Import

RallnusRallnus Member Posts: 79
edited 2006-04-26 in Navision Attain
At 1st: thanks for your examples, roman.

I solved several nodes beginning like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <ORDER>
-<ORDER_HEADER>
- <ORDER_INFO>
<ORDER_ID>4501136617</ORDER_ID>

with the code:

OpenXMLDocument(filename,XMLDocument);
LoadNodeList(XMLDocument,XMLNodeList,'ORDER/ORDER_HEADER/ORDER_ID');
LoadNode(XMLNodeList,XMLNode,0);
REPEAT
.....

But now I've a new file that starts like this:

<?xml version="1.0" encoding="UTF-8" ?>
- <IDataXMLCoder version="1.0">
- <record javaclass="com.wm.data.BasicData">
<value name="fileName">c:\temp\pipeline_test.xml</value>
- <idatacodable name="iDocList" javaclass="com.wm.vrg.sap.idoc.BCDocumentList">
- <array name="iDocs" type="idatacodable" depth="1">
- <idatacodable javaclass="com.wm.pkg.sap.idoc.BCDocument">


What is the code to load nodes like these?

I tryied..

a) LoadNodeList(XMLDocument,XMLNodeList,'IDataXMLCoder version');

b) XMLNodeList := XMLDocument.getElementsByTagName('IDataXMLCoder version');

c) XMLNodeList:=XMLDocument.selectSingleNode('IDataXMLCoder version');

..but all without sucess.

The error message is "The call to Member selectSingleNode failed. msxml3.dll returned the following message "Expected Token eof found 'NAME'. IDataXMLCoder --> Version <--"

:?: Thx for Ur help.
Rallnus (Yamaha FJ1200 - '89 / 25th anniversary was great!)

Answers

  • RallnusRallnus Member Posts: 79
    now I've solved the problem of reading the parent node. The way is not to mention the phrase after the first expression.
    Example:

    To find this node: <record javaclass="com.wm.data.BasicData"> you have to seach for <record>. The blank between "record" and "javaclass" will cause an error.

    But what ist the way to get a special tag like <value name="BELNR">4500282151</value> ?

    How can you specialize to get the tag "BELNR" ?
    Rallnus (Yamaha FJ1200 - '89 / 25th anniversary was great!)
Sign In or Register to comment.