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.