Jeffrey D. Smith wrote:
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of McKown, John
Sent: Friday, July 20, 2007 11:44 AM
To: [email protected]
Subject: JAVA SAX XML parser - GOTCHA!
This may well be documented somewhere, but I haven't has yet seen it. I
just downloaded JBOSS 4.2.1 and am looking at it. Well, it's cheaper
than WAS! It keeps its configuration files in XML format. Now, usually
XML is "plain text" as opposed to "binary". So when I created the z/OS
JBOSS, I translated the "*.xml" files to EBCDIC. Bad move! I tried to
start JBOSS and got a bunch of errors from the SAX parser that didn't
make sense. I finally noticed on the Dovetailed Technologies web site
for TOMCAT that they said to keep the "*.xml" files in ASCII. So I
restored the ASCII version of the XML files and JBOSS came up (not that
I know what to do with it now - still reading!). From this, it appears
that the XML parser that comes with IBM's JDK 1.5_64 (what I am running)
can only read ASCII encoded xml files. Isn't that a trip? Or am I doing
something else wrong?
--
John McKown
XML files start with a header entry in UTF-8 that describes the text
format (usually the remainder of the file is also in UTF-8). Supported
text formats are from the UNICODE set. I don't know whether XML parsers
are supposed to support EBCDIC, nor how to specify EBCDIC in the XML
header entry. Even if you found a way to specify EBCDIC text format,
you must still use UTF-8 for the XML header entry. Seems simpler to
just leave the entire file in UTF-8 format.
The Enterprise COBOL XML parser can parse XML files in EBCDIC
just fine. We do that a number of times in our 1.5 day course
"Enterprise COBOL Update II: Unicode and XML Support".
(ref.: http://www.trainersfriend.com/COBOL_Courses/d705descr.htm )
The parser used by COBOL supports code pages 1200 (UTF-16), 1047,
1140-1149, and definitely does _not_ support 1208 (UTF-8).
Of course the XML parser that comes in the JDK is probably
a different parser, but I don't know for sure.
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
z/OS Application development made easier
* Our classes include
+ How things work
+ Programming examples with realistic applications
+ Starter / skeleton code
+ Complete working programs
+ Useful utilities and subroutines
+ Tips and techniques
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html