XML Library  
 

XML Library (v9.1d and higher)

Download here

Here is a tool that was supposed to help working with XML inside progress code but unfortunately its development was never finished. May be in the future somebody will continue debugging it. This tool can be used with both DOM and SAX parsers - there is a parameter to do that.



The main purpose of this tool is to write less code and make parsing of xml as dynamic as possible. For example, you have an xml file like:
<data>
  <person>
    <last>Last</last>
    <first>First</first>
    <line>
      <id>123</id>
    </line>
  </person>
</data>


There are 2 different ways you could use this tool to work with this file – using static or dynamic tables. In order to parse this file using static tables you would simply write a code like this:

for each person:
  disp firstName lastName.
  for each line where person.person = line.person:
    disp line.id format "x(50)".
  end.
end.


To do it dynamically, you would need to write something like this (please note that dynamic load will parse the same file twice – can be costly for big xml files)

do while {xmlsdk/prop isAvail person}:
  disp {xmlsdk/val person last}
      {xmlsdk/val person first}.
  do while {xmlsdk/prop isavail line}:
    disp {xmlsdk/val line id} format "x(50)".
    run getNext("line").
  end.
  run getNext ("person").
end.

Look at working example in the archive called sample.p. Look for more documentation in xmlsdk/xmlload.i.

Run xmlgui/generator.w to generate include file with temporary tables to use when working with static tables. Also, this tool helps to know what your source xml file looks like and provides ways to reference xml elements in your code with other names than in the source xml file.

Installation Instructions:
• Extract archive to some directory
• Start procedure editor
• Add directory where you put the files to propath
• Open sample.p and read additional instructions

Download here

Originally developed in v9.1d. Last tested with v10.

 
 
 
 
 
© 2008 DIT Integration Services Inc Home  |  About Us  |  Services  |  Downloads  |  Clients  |  Links  |  Contact Us