Using READ-XML

bwoolsey

New Member
I am using READ-XML to populate a DATASET. Everything works fine until I try to read an XML file that does not contain an "ENTRY" element. It is just a "PING" request from the system I am communicating with and it only contains a "timestamp" element and a "msgid". The READ-XML will execute but it does not populate the DATASET. What do I need to do to get it to function without the "Entry" element?
Thanks
Bud
 
AFAIK, the READ-XML method to populate a ProDataSet ( or a TEMP-TABLE ) only works when the XML is in a specific format. They are not meant to be working with "every" XML.

Heavy Regards, RealHeavyDude.
 
The variety of XML documents which can be turned into PDS will be expanded in 11.0, but is still finite. In most cases, if you think about it a while, it makes sense. We don't really have enough details to tell about your case.
 
The issue is if the XML file is formatted:

<?xml version="1.0"?>
<PingRequest>
<TimeStamp>2011-09-21</TimeStamp>
<MsgID>55555</Msgid>
</PingRequest>

the READ-XML fails to return any data

BUT if the format is:

<?xml version="1.0"?>
<PingRequest>
<PingEntry>
<TimeStamp>2011-09-21</TimeStamp>
<MsgID>55555</Msgid>
</PingEntry>
</PingRequest>

The data is return correctly.

It's like there is a parent / child relationship missing in the first format.

Thanks
Bud
 
Back
Top