× 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.



Hi - I found that CGIDEV2 makes writing XML amazingly easy. Here are some articles that should show you how easy it is.

http://www.ibmsystemsmag.com/ibmi/developer/rpg/Using-CGIDEV2-for-Generating-XML/

http://www.scottklement.com/presentations/XML%20From%20RPG%20Using%20Free%20Tools.pdf (look at pages 5-7)

You can also go to the home of CGIDEV2 = http://www.easy400.net = search on that page for "tuohy"- that's Paul Tuohy, who has several articles on CGIDEV2. They don't mention XML directly, but they have general suggestions for using CGIDEV2 that I've found helpful. Things like make the tag markers for sections and variables - make them into comments.

HTH
Vern

On 5/12/2014 6:15 PM, rpuglia@xxxxxxxxxxxxxxxxx wrote:
We have CGIDEV2 available as someone contracting for us needed it for some web service functions. I am not familiar with it as I have been developing XML apps using the toolkit. Looks like I will be getting familiar with it now. Thanks for the advice all.

Sent from my iPhone

On May 12, 2014, at 7:08 PM, "Vernon Hamberg" <vhamberg@xxxxxxxxxxxxxxx> wrote:

XML Toolkit is not related to CGIDEV2 at all - the latter uses CGI APIs
to write to whatever, including a buffer in memory (a variable).

The toolkit uses some well-known (I think) APIs from the industry -
www.xml.com would be a place that might have some information - it's
hard to get the toolkit's docs, since you get them only when you install it.

I like moving to CGIDEV2, as well - but it might not be an option, so an
alternative could also be writing out to a user space - that can be
processed just like any IFS file, and you can have a pointer to it that
a variable is based on. Ba-da-bing,

HTH
Vern

On 5/12/2014 4:37 PM, Scott Mildenberger wrote:
Haven't used those api's and hard to tell without seeing your code. But it looks like it is based on CGIDEV2 so instead of writing the html to stream file you can use this procedure, notes form prototype copy member.

******************************************************************
* GetHtmlBufferP subprocedure - Retrieves the pointer to the Html output buffer
* Returns a data structure containing
* - the pointer to the Html output buffer
* - the used length of the Html output buffer
* Example:
* D OutBuffer s 32767 based(OutbufferP)
* D OutBufferInfo ds
* D OutBufferP *
* D OutBufferLen 10u 0
* C eval OutBufferInfo=callp(GetHtmlBufferP)
******************************************************************
D GetHtmlBufferP pr 20

The other option, you can have it write to IFS file and then read that file into a variable that you can pass to the other program.

Scott


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rpuglia@xxxxxxxxxxxxxxxxx
Sent: Monday, May 12, 2014 3:14 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: XML Toolkit - create an XML file to be passed as a parameter

Not sure how to get properly formatted XML document into character string using DOM api's from toolkit

Sent from my iPhone

On May 12, 2014, at 4:58 PM, "Scott Mildenberger" <SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:

Can't you just pass it as a large character parm between the two programs?

Scott


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.