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

That's true as far as it goes but then when some "real" XML arrives - and
eventually it will - then a full XML parser will be called for. This will
probably come about after the in-house parser breaks or processes the new
XML incorrectly. By incorrect I mean doing things like inserting entities
into the database as though they were actual text, so columns will contain
data like "Steptoe & Son Ltd" instead of "Steptoe & Son Ltd".

What you're describing is text masquerading as XML, not XML.

When sending data the same principle applies; the data to be transmitted is
not simply some text stuck between a couple of tags formatted to look like
XML - the data has to be encoded as well, so it's a bit more complex than
building some strings that look like XML.

Having been burned on this once I'd go the route of doing it properly and
using a parser and XML-aware tooling from the start.

Regards
Evan Harris


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of James H. H. Lampert
Sent: Friday, 4 December 2009 5:21 a.m.
To: RPG programming on the IBM i / System i
Subject: Re: So let me get this straight.... (XML in RPG)

Larry Ducie wrote:

I would consider this statement to be true only if you can guarantee
the XML element to be found is uniquely named, and the unique name
will exist in one and only one XPath location. Even with these
guarantees you have to consider that other XML elements may have a
name that begins with this name and this element may/may not have
attributes. These two combined can cause false positives:

Indeed. Very well put.

Then again, if you're parsing it with something less than a full XML
parser, you're probably going to be parsing a small, highly predictable,
family of XML data streams, rather than actually parsing XML as XML.

At least, that's what I've done, where XML data streams been shoved down
my throat with no other meaningful alternative offered.

--
JHHL

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.