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



In addition to the other responses, a "from RPG" solution is

Scott Klement's web page has info on running Expat on i - and I used that
back in V5R4
https://www.scottklement.com/expat/
The articles he wrote , listed on the web page - 1,2,3 appear to be bad
links, but article 4 has new links to 1,2,3.
I didn't use Expat for validation - used a XML Spy tool because the XML was
gigabytes long (there are posts about this several years ago in midrange-l
or rpg400-l) and XML Spy and a very powerful workstation, was only tool I
could find that could handle the editing, but then Expat was fine processing
it.

As an alternative, and not knowing what is in the Python port that others
had done in v5r4, this may be a possible answer -

Python contains a simple parser called minidom - and this (from stack
exchange) will edit the xml
import xml.dom.minidom
xml.dom.minidom.parseString('<My><XML><String/><XML/><My/>')
You will get a xml.parsers.expat.ExpatError if the XML is invalid.

Hth
Jim Franz

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of p.Caroti
Sent: Saturday, January 21, 2017 10:24 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: How to validate an XML File with RPG

Hi all



I would need to validate an XML file with RPG, doe's anyone know if is it
possible and if yes, where can I find some example ?



Thanks in advance

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

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD


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