XMLnode := XMLdoc.selectNodes(Path);

b52b52 Member Posts: 22
Yo!

In a Codeunit with automation: 'Microsoft XML, v6.0'.DOMDocument60 I want to do this:

for each xmlElement in XMLdoc.selectNodes(“Bla/bla”)
itemNo = xmlElement.getAttribute(“itemNo”)
quant= xmlElement.getAttribute(“quant”)
Next

but no success... :^o
How does this translate?
Where can I read about this?

Hilfe!

Answers

  • JedrzejTJedrzejT Member Posts: 267
    Hi
    Search msdn for "xmldom reference" but I prefer to use XmlPort for reading xml - easy way.
  • b52b52 Member Posts: 22
    Thanx Jedrzej!

    I'll try your "XmlPort for reading xml - easy way"

    So, XMLPORT.IMPORT(50001, InStreamQue); is a good start and then? Have anyone got an example?
    Meanwhile, I'll search the fora ...

    /K
  • JedrzejTJedrzejT Member Posts: 267
    example:

    NewFile.OPEN(QLSetup."XML folder"+ '\rest.xml');
    NewFile.CREATEINSTREAM(TextStream);
    XmlPort.SETTABLEVIEW(ImportHead);
    XmlPort.SETSOURCE(TextStream);
    XmlPort.IMPORT;
    NewFile.CLOSE;

    Var:
    TextStream - InStream
    NewFile - File
    ImportHead - Racord
  • b52b52 Member Posts: 22
    Thanx JedrzejT!

    It didnt solve my problem i'll close this Q and refrase a new one.

    /K
Sign In or Register to comment.