Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB and XML

Status
Not open for further replies.

Kocky

Programmer
Oct 23, 2002
357
NL
Hello there,

Is there anyone out there who has experience in browsing through an XML document using VB script ?

What I want is to browse through all records within a certain segment.
I want to select segment "E1EDP01" and browse through all
items within this segment in a for loop construction.
The XML layout is like this:

TOP_SEG
E1DP01
E1DP02

The segment E1DP01 is on the same level as TOP_SEG. It is not a child of TOP_SEG.
We tried the following code but is does not work:

set segHeader = theIDoc.Segments.Top
set SegCurrent = segHeader.NextSibling("E1EDP01")
for each SegCurrent in segHeader.NextTwin("E1EDP01")
set Werks = SegCurrent("WERKS")
next


The XML comes from a SAP system (IDOC ORDERS05) and we need to parse it.

Hope someone can help me.

Greetings,

Pascal.
 
This is a VB forum. Do you want a VB solution or a VBScript solution. If you want a VBScript Solution, please repost this in the VBScript forum and I or someone else will help.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
You're right.
I moved the question to the VB script forum.
 
Thanks. That will make it easier for other people with similar problems to find their answer.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top