× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



DB2 has supported an XML type for a while. The question is whether you can query against data stored in an XML type in a standard relational query. With pureXML, you use XQuery or SQL with XML extensions to get at the data. It's pretty awesome.

I don't think SQL Server has the same capabilities.

That being said, it's problematic that this technology (which is over five years old) hasn't yet made it to the i. With all the recent discussion about the glorious future of the platform, you'd think this would be a pretty technology to implement.

Joe

That DB2 update will be nice for customers who need to store raw XML such as ours do.

However will it be available in V7R1+ or back ported to V5R4 and V6R1 ? We still see lots of customers on those releases.

SQL Server already supports an XML type. Not sure about MySQL.

Our web forms product stores its documents in XML format so the need will become increasingly important to transparently process databases stored XML from the i for our customers and others I would imagine.

You're correct that Java is pretty much re-writing the XML file, but it sure feels bodaciously easy (if that's a word) :-)

Regards,
Richard Schoen
RJS Software Systems Inc.
Where Information Meets Innovation
Document Management, Workflow, Report Delivery, Forms and Business Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site: http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT

------------------------------

message: 5
date: Sun, 23 Dec 2012 11:57:03 -0600
from: Joe Pluta <lists@xxxxxxxxxxxxxxxxx>
subject: Re: Updating XML File from an RPG App

On 12/21/2012 11:14 AM, Richard Schoen wrote:
I found a Java example and it took about 30 minutes to put together a general Java program to accomplish this.

I wrapped it with a CL program and Viola it's done.

Hate to say it but for complex things like XML, Java is much more efficient.
Two things. First, XML isn't complex. The problem is the implementation. It's a stream file, something that RPG has never been strong dealing with. We've gotten MUCH better over the years with varying fields and a number of other great capabilities, but still it's not RPG's strong suit. I don't care is it's CSV, PNG or XML, RPG isn't optimal for stream files. That being said, you can do a whole HECK of a lot with the XML support in RPG; combine XML-INTO and CGIDEV2 and RPG is a very powerful XML processing environment. Whether to use it depends on how much back end RPG you need to do.

Second, the problem is the implementation :). When you say "update" you don't really mean update. To update an XML file, you literally rewrite the stream file. Java may hide the complexity, but you're still rewriting the stream. You don't just insert (or delete) a few bytes in the middle of the file. You can do the same thing in RPG relatively easily, but it's not as straightforward as the wrappers that Java provides. As usual in RPG you have to do a lot of the heavy lifting yourself.

But that's all going to change. You might want to check into DB2 9, which is currently only available for DB2 LUW but hopefully is coming soon to an IBM i near you (and me!). DB2 9 uses pureXML which in my opinion will pretty much do away with most of the XML processing we do today.

You can directly query an XML document much like you would a normal relational table and you can combine relational and XML access, updating one from the other, all at a high level and without having to shred the XML document yourself.

It's most bodacious.

Joe





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.