Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
XMLi anyone???
has no ratings.
Published: 16 Sep 2016
Revised: 22 Mar 2017 - 511 days ago
Last viewed on: 15 Aug 2018 (1552 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

XMLi anyone??? Published by: Chris Proctor on 16 Sep 2016 view comments(7)

Happy Friday, everyone! I'm hoping to get some input here. I've never tried to create an XML file on the IFS based on SQL result set, but I've now been asked to do it. I've looked at IBM's DB2 XML Manual and it seems a little confusing to me. I see where you could use XMLELEMENT with a SELECT statement to construct an XML element, but I couldn't quite figure out how I could then write to the XML file.

So, I kept searching the web for a possible easier solution. Well, I found some open source, XMLi, which seems pretty slick to someone who doesn't know what they're doing. Lol. Anyway, I was curious if anyone  has any experience with this software that might be able to answer a question for me. One of my elements has an attribute embedded in it and I'm not sure if that can be done using XMLi. This is what it looks like:

<amount quantity="1">75.00</amount>

I could use xmli_attribute for the attribute and xmli_element for the element, but I'm not sure if they can be embedded. Any suggestions regarding creating an XML file on the IFS would be greatly appreciated. I've been looking into this for a couple of days now.

Thanks!

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS