× 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 Paul,

There's an option for that, too. Try specifying trim=none in your Options.

I'm guessing that feature was put there because of RPGers insistence on putting XML data into physical files (flat files) with fixed-length fields? Once they've done that, there's no way the document can comply with XML standards -- but RPG programmers seem to like to put data into PFs. The trim option (which is on by default) removes the extra spaces that the PF adds.

Of course, for those who don't want it (you), just specify trim=none.



On 12/27/2010 12:26 PM, Paul Nicolay wrote:
Hi Scott,

Thanks for pointing me out... while it is another system (it could have
been a PTF issue) that I tried this "nicely formatted" example, I used
XML-INTO plenty of times without any issue. Anyway, I should stop
formatting XML tags nicely in examples.

Anyway, the reason I was making this example is... demonstrate that
whitespace is NOT preserved by XML-INTO ? If I changed the XML to...

XML = '<myRoot><aString>Hello
world</aString></myRoot>';

And parse it, the variable myRoot.aString contains "Hello world" with
only one, instead of 20 blanks ?

According to http://www.w3schools.com/xml/xml_syntax.asp this is not
correct, and XML should preserve its whitespace unlike HTML (where you
can force it with&nbsp; which isn't recognized by XML neither).

Kind regards,
Paul


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.