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



OK, I posted an example of writing XML to the IFS from an RPG program on
the website.  Visit the codesamples page:

http://www.rpgnext.com/codesamples/

The file is BPRSLTXML.RPG.  This member has a couple things that may be
of interest: first, it uses the IFS /copy member to create and write a
text file in the IFS.  That text file happens to be XML, so all of the
string output is XML formatted text.  There is also a procedure in there
I use for adding XML tags (that could easily be adopted to HTML), and a
procedure I use for controlling indention.  Unfortunately, this example
doesn't actually use the indent (I copied it from another program...)
because it doesn't require that formatting.

This is just a sample, so it isn't complete, you would need to add file
access and stuff, but maybe it will be of interest.

Joel
http://www.rpgnext.com

On Tue, 2004-07-13 at 14:09, Joel Cochran wrote:
> I ran into a problem today... I'm creating an XML file from a 400
> database, and one of the fields has an ampersand embedded in the text. 
> When I try to open the XML file in a browser (Firefox .8), it bombs
> because of the ampersand (it should be &).  To address this, I'm
> going to write a procedure that will find HTML/XML special characters
> and replace them with the appropriate codes.  There will also be a
> co-procedure for un-converting these as well.
> 
> My question is, will this be useful as part of the xRPG library?  And if
> so, are there any other similar procedures I could add to create a new
> service program?  I already have an "unescape" routine that I use to
> convert incoming URL strings from their embedded codes (%20 = a space,
> %2c = a comma, etc), so I could add that as well.  Stuff like that or
> anything dealing specifically with HTML/XML string processing would be
> great.
> 
> Joel
> http://www.rpgnext.com
> 
> _______________________________________________
> This is the RPGNext Discussion and Information (RPGNext) mailing list
> To post a message email: RPGNext@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpgnext
> or email: RPGNext-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpgnext.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2025 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.