Skip to main content

Trying to use some XML functionality and the doc's aren't very useful. But this is my first attempt trying to deal with XML on UniVerse and in general.

The purpose is pretty straightforward, take XML feeds, break them down and write them to a UniVerse File. I started with writing a small program in BASIC to try to get familiar with the syntax and flow and utilize the XML functions available to me instead of creating my own parser. Getting unexplained error, basically having to do with the xml_handle or handler ? I'll attach results as well as the test file. I then tried to mimic the program below and get farther along, but not getting any data.

A couple of points: 1) I've only mapped the first 4 items of the XML file and created those 4 items in the DICT (out of 25)

Thanks for any assistance.....Plus, how/when is the data written to the UniVerse file. Is this where I process and write my own records after the READ (where I'm stalling now) ?

Al Zyle




------------------------------
Al Zyle
Senior PICK Developer/Consultant
Rocket Forum Shared Account
------------------------------

Trying to use some XML functionality and the doc's aren't very useful. But this is my first attempt trying to deal with XML on UniVerse and in general.

The purpose is pretty straightforward, take XML feeds, break them down and write them to a UniVerse File. I started with writing a small program in BASIC to try to get familiar with the syntax and flow and utilize the XML functions available to me instead of creating my own parser. Getting unexplained error, basically having to do with the xml_handle or handler ? I'll attach results as well as the test file. I then tried to mimic the program below and get farther along, but not getting any data.

A couple of points: 1) I've only mapped the first 4 items of the XML file and created those 4 items in the DICT (out of 25)

Thanks for any assistance.....Plus, how/when is the data written to the UniVerse file. Is this where I process and write my own records after the READ (where I'm stalling now) ?

Al Zyle




------------------------------
Al Zyle
Senior PICK Developer/Consultant
Rocket Forum Shared Account
------------------------------

Al,

There are some XML examples in Rocket's knowledge base - e.g.

Just search on the criteria and you might find a fully worked example - hopefully this helps.

Regards

JJ



------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------

Trying to use some XML functionality and the doc's aren't very useful. But this is my first attempt trying to deal with XML on UniVerse and in general.

The purpose is pretty straightforward, take XML feeds, break them down and write them to a UniVerse File. I started with writing a small program in BASIC to try to get familiar with the syntax and flow and utilize the XML functions available to me instead of creating my own parser. Getting unexplained error, basically having to do with the xml_handle or handler ? I'll attach results as well as the test file. I then tried to mimic the program below and get farther along, but not getting any data.

A couple of points: 1) I've only mapped the first 4 items of the XML file and created those 4 items in the DICT (out of 25)

Thanks for any assistance.....Plus, how/when is the data written to the UniVerse file. Is this where I process and write my own records after the READ (where I'm stalling now) ?

Al Zyle




------------------------------
Al Zyle
Senior PICK Developer/Consultant
Rocket Forum Shared Account
------------------------------

Hi Al,

I noticed there might be a coding error in your program. The PrepareXML function populates the xml handle as OUTPUT_XML. But in the OpenXMLData() function, the OUTPUT.XML is in quotes. So it would be treated as a literal string rather than the xml handle. I'm not very familiar with this particular BASIC functionality but I would suggest removing the quotes around OUTPUT_XML in the Open statement and try again.

Thanks,

Neil



------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------

Trying to use some XML functionality and the doc's aren't very useful. But this is my first attempt trying to deal with XML on UniVerse and in general.

The purpose is pretty straightforward, take XML feeds, break them down and write them to a UniVerse File. I started with writing a small program in BASIC to try to get familiar with the syntax and flow and utilize the XML functions available to me instead of creating my own parser. Getting unexplained error, basically having to do with the xml_handle or handler ? I'll attach results as well as the test file. I then tried to mimic the program below and get farther along, but not getting any data.

A couple of points: 1) I've only mapped the first 4 items of the XML file and created those 4 items in the DICT (out of 25)

Thanks for any assistance.....Plus, how/when is the data written to the UniVerse file. Is this where I process and write my own records after the READ (where I'm stalling now) ?

Al Zyle




------------------------------
Al Zyle
Senior PICK Developer/Consultant
Rocket Forum Shared Account
------------------------------

I agree with Neil, it appears the documentation is duff as the example has it in quotes like you have done but the variable returned from the prepare should be the variable used in the open



------------------------------
Mike Young
Senior PS Techical Consultant
Aptean
Atlanta GA US
------------------------------

Hi Al,

I noticed there might be a coding error in your program. The PrepareXML function populates the xml handle as OUTPUT_XML. But in the OpenXMLData() function, the OUTPUT.XML is in quotes. So it would be treated as a literal string rather than the xml handle. I'm not very familiar with this particular BASIC functionality but I would suggest removing the quotes around OUTPUT_XML in the Open statement and try again.

Thanks,

Neil



------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------

Thanks to all, that seemed to solve 1 issue, and found a few examples so far...on to the next issue  to try to make this workable!  Struggling with traversing the "Node's", etc...I  admit these functions are new to me & I've got 30+ years UniVerse but haven't had to utilize the functionality yet. I'll rely on the folks here to guide me along until I get rolling ! TIA...I'll follow up with my "Real Life" example/file, etc... 



------------------------------
Al Zyle
Senior PICK Developer/Consultant
Rocket Forum Shared Account
------------------------------