How to read XML files.

Author: felipedonatti@hotmail.com (fdonatti)

Good afternoon everyone, I'm looking for some example of reading XML files by Uniface. I found the UXMLWrite and UXMLReader but nothing very explanatory. I wonder if anybody here the forum has a working example to send me.

5 Comments

  1. Hi, What version of Uniface are you working with? 9.5 introduced the struct data type and the xmltostruct statement, this is the easiest way to work with most XML these days. Regards, James


    Author: James Rodger (james.r.rodger@gmail.com)
  2. on the XLMReader: It's just a matter what you want to do with the information passed back from the reader via the callback functions. Well, it's a drag using copy&paste for all the different help-pages which are suptopics of the SAX Callback Operations but this and some hand made XML files gives you a start for experiments what XMLReader will deliver. It's standard SAX under the hood, so any explanation/tutorial googled from JAVA, ORACLE, ... may help you understand the concept. Try to persuade you account manager if he can give you some more detailed material from workshops/courses, will save you a lot of time.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  3. fdonatti said Good afternoon everyone, I'm looking for some example of reading XML files by Uniface. I found the UXMLWrite and UXMLReader but nothing very explanatory. I wonder if anybody here the forum has a working example to send me.

    Hello, If you are looking for a UXMLWRITER sample then please have a look at the Uniface Sample XML Integration (IntegrateXml.zip) that you can find in the samples directory (\uniface\samples) of your Uniface 9 installation (version 9.4 or higher). And if you are using version 9.5 (or higher) then the Struct data type might be a good way forward, as my colleague James already explained. Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. Sorry, double posting...


    Author: diseli (daniel.iseli@uniface.com)
  5. ulrich-merkel said Try to persuade you account manager if he can give you some more detailed material from workshops/courses, will save you a lot of time.

    Thanks to Daniel Iseli for giving us the name of the sample file (perhaps someone can put that reference into the helpfile), no account manager needed. On the struct issue: think for the moment, it's not very clear how to traverse the struct I got after the xmltostruct statement in order to "read" the XML file.


    Author: ulrich-merkel (ulrichmerkel@web.de)