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



Use the SAX parser instead that is also on my site.  It is quite faster
and less bulky.  I don't support the DOM parser wrappers I wrote anymore
because the SAX parser is the one to use.

BTW, if you know Java that is the way you should be processing your XML.
WDSc has some amazing wizards to get you up and running with XML in
minutes, literally.  

Aaron Bartell


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] 
Sent: Monday, October 11, 2004 7:33 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: [RPG XML] misuse of DOMXPath_getElemCount() ?

Hi there,
i'm trying to parse an XML file in RPG with Aaron Bartells DOM parser
wrapper functions (www.mowyourlawn.com).
But Aarons DOMXPath_getElemCount() seems to return the wrong
elementcounts.

The file i'm parsing is: http://www.myangel0ne.de/test.xml

When i parse it, the file lies in the ifs with CCSID 819.
I initialize my parser with:
eval
gDOMParser=DOMParser_init(IFS_FILE:gFileLocation:VALIDATE_NO:CCSID37:%PA
ddr(catchError))
gFileLocation is "/tmp/xmlfile.txt".

I want to work with these "WegPunkt" Elements.
As I see it, the file has 105 of them.

In my RPG Program
eval
gNodeCount=DOMXPath_getElemCount(gRoot:'MGSvrReturn/RouteListe/WegPunkte
/WegPunkt')
keeps telling me that there are just 84 of these elements.

The other time i had 134 elements and RPG meant there are just 116.

Everything else but these elementcounts works really fine.
Maybe anyone here has an idea whats wrong with my program.


- Martin


--
This is the RPG programming on the AS400 / 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:

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.