In reply to my own post:
I checked the encoding of the file on the mainframe and it is Cp1047, which
is the EBCDIC code page.
Will Xerces or JDOM.SAXBuilder have any problems if I feed it a file of this
encoding? Do I have to translate the file some way?
> -----Original Message-----
> From: Kevin Baynes [mailto:kbaynes at seagullsw.com]
> Sent: Friday, September 21, 2001 11:39 AM
> To: jdom-interest at jdom.org> Subject: [jdom-interest] SAXBuilder on OS/390
>>>> I'm having trouble reading in an XML file into SAXBuilder from a Servlet
> in WebSphere on OS/390. It works fine on WAS on NT and Tomcat on NT.
>> I'v uploaded the file via FTP using ASCII mode, which I think should
> translate it into EBCDIC on the other side. When I download the XML file
> and look at it, it looks fine.
>> I built some debug code into the servlet, where I get the XML file and
> write it into the debug log prior to giving it to SAXBuilder. The log
> info is below.
>> Any ideas? Do I need to modify the character encoding prior to giving it
> to JDOM?
>> --- LOG FILE
> Init Date = Thu Sep 20 06:14:00 PDT 2001
> getDocument(): got the file
> getDocument(): trying to build doc
> getDocument(): building from clear data, code 001
> getDocument(): document =
> 'Loõ»¼@¾ÕË½ÂÌÉ~
¤KÐ
@ÕÉÙÌ¿ÂÉÁ~
"Æ'`>
onLZ``@Z(tm)ÇÆSz@¼ÌÁÂÉ½@fSfÆâ@
¼
> ÌÁÂÉ½K¿oe¿
@``nL¼ÌÁÂÉ½n@@LÏ½ÕËn@@@@LÏ½ÕËÉ³»ÕnP¼oe^ÉÌoe@ÊËÌ¾Â¿Õ¿PÁoe^L
> aÏ½ÕËÉ³»Õn@@@@L¼ÌÁÂÉÂ¿nÌÝÉÕËLa¼ÌÁÂÉÂ¿n@@@@LÊÝÌË¿nÌÝÉÕËLaÊÝÌË¿n@@@@L³¿
> »ÂÉ¼Õ¾Õ¼nÌÝÉÕËLa³¿»ÂÉ¼Õ¾Õ¼n@@LaÏ½ÕËn@@LÏ½ÕËn@@@@LÏ½ÕËÉ³»ÕnP¼oe^ÉÌoe@Ê
> ËÌ¾Â¿Õ¿PÁoe^LaÏ½ÕËÉ³»Õn@@@@L¼ÌÁÂÉÂ¿n³¿»ÂÉLa¼ÌÁÂÉÂ¿n@@@@LÊÝÌË¿n³¿»ÂÉLaÊ
> ÝÌË¿n@@@@L³¿»ÂÉ¼Õ¾Õ¼n³¿»ÂÉLa³¿»ÂÉ¼Õ¾Õ¼n@@LaÏ½ÕËn@@LÏ½ÕËn@@@@LÏ½ÕËÉ³»
> ÕnP¼oe^ÉÌoe@ÊËÌ¾Â¿Õ¿PÁoe^LaÏ½ÕËÉ³»Õn@@@@L¼ÌÁÂÉÂ¿n¿Õ»ÌLa¼ÌÁÂÉÂ¿n@@@@LÊÝ
> ÌË¿n¿Õ»ÌLaÊÝÌË¿n@@@@L³¿»ÂÉ¼Õ¾Õ¼nÏ½ÕËLa³¿»ÂÉ¼Õ¾Õ¼n@@LaÏ½ÕËn@@LÏ½ÕËn@@
> @@LÏ½ÕËÉ³»ÕnP¼oe^ÉÌoe@ÊËÌ¾Â¿Õ¿PÁoe^LaÏ½ÕËÉ³»Õn@@@@L¼ÌÁÂÉÂ¿nÏ½ÕËmö"¢>La¼
> ÌÁÂÉÂ¿n@@@@LÊÝÌË¿@an@@@@L³¿»ÂÉ¼Õ¾Õ¼nÏ½ÕËLa³¿»ÂÉ¼Õ¾Õ¼n@@LaÏ½ÕËnLa¼ÌÁÂ
> É½n'
> getDocument(): Exception: org.jdom.JDOMException: Error on line 1 of
> document
> file:/usr/lpp/WebSphere/AppServer/hosts/default_host/swm/data/logins.xml
> : The root element is required in a well-formed document.
> error in login
>> --------------------
> Kevin Baynes
> Software Engineer
>kbaynes at seagullsw.com