PDA

View Full Version : XML to recordrecordlist


sirWilliam
02-19-2003, 20:00
I am reading an XML file into a document into a record -- it all works fine as long as there are two or more children per branch. However, if there is only a single instance of an XML tag (resulting in a single record branch) instead of a RECORDLIST i get a RECORD -- this causes all sorts of problems since i cannot loop over it. What should I do? Can I forge all XML to record conversions to be a loop?

reamon
02-19-2003, 21:39
In the documentToRecord call, are you specifying a recordName parameter?

vinodravi
02-19-2003, 22:50
try including the name of the node you have to get as a record list in the arrays field. This willwork.
There are other ways too.
Thanks

wkriski
02-20-2003, 08:54
You have two options - supply a recordName as Rob suggested (assuming your record reference indicates that the element in question is a recordList), or set the arrays parameter to tell webMethods which nodes are supposed to be recordLists.

Will Kriski

sirWilliam
02-20-2003, 11:49
Thanks everyone for your help! This worked very well