[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Unicode Character found while parsing an XML.


invalid xml character
The most likely reason is that the serializer for some element is faulty and
has generate a 0x00 at the end of a field, which has been inserted as element
content.

Open the text up in a hex editor and check for 0x00.  If there is a 0x00 then
delete it, and get the generating software fixed up.

The other possibility is that when reading the document in, you have gone
past the end of a stream and continued to read: a null 0x00 can come
along in that case.

A slight possibility is that the database is corrupt, and a text field has a null
in it.  Fix the database.

Cheers
Rick Jelliffe


----- Original Message ----- 
From: <Nirmal.Kumar@i...>
To: <xml-dev@l...>
Sent: Friday, September 06, 2002 8:16 PM
Subject:  Unicode Character found while parsing an XML.


> Hi,
>     I am getting a strange problem while running my application on websphere
> application server. This Problem is coming only if I am running the
> application using Beans i.e. in EJB mode. If I use Simple Classes i.e. run
> the application in DIRECT mode, it's working fine. The Error Printed is ---
>  
>  
> XSL Error: Could not parse Input XML document!mm
> XSL Error: SAX Exception
> org.apache.xalan.xslt.XSLProcessorException: An invalid XML character
> (Unicode:
> 0x0) was found in the element content of the document.
> \b0 at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
> at org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngin
> eImpl.java:852)
> at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
>  
> The Current Environment is :
>  
> Websphere Version : 4.0.1, Edition: Advanced Edition for Multiplatforms
> DataBase : Oracle 9i
> Oracle XML Parser : xmlparserv2.jar 
>  
> The XML which is coming with the appended character is below...
> 
> Check the nodes marked as red. The value in these nodes is getting
> appended by Unicode charaters.
> 
> ?xml version="1.0"?><faml><mci sessionid="1837323928UDPVQGMX"
> appid="AW" txnid=
> 
> "CMP" scrnseqnbr="11" requestid="1837323928UDPVQGMX678842052TK"
> langid="eng" web
> 
> serverid="AW" appserverid="AW"
> deviceid="01"></mci><fldLoginUserType>O</fldLogin
> 
> 
> UserType><fldPhoneNo></fldPhoneNo><fldRoleId>INDUSERAL</fldRoleId><fldMainTx
> nId>
> 
> 
> PRF</fldMainTxnId><fldEmailNickName></fldEmailNickName><fldLoginUserToken></
> fldL
> 
> 
> oginUserToken><fldEmailVal></fldEmailVal><fldPageId>ADD_EMAIL</fldPageId><fl
> dLog
> 
> 
> inUserCss>default.css</fldLoginUserCss><fldStatus></fldStatus><fldParentUser
> Id>6
> 
> 66777888</fldParentUserId><fldChannelPartnerId>AW
> </fldChannelPartnerId><fldLogi
> 
> 
> nUserId>666777888</fldLoginUserId><fldRowNo></fldRowNo><fldLoginCustId></fld
> Logi
> 
> nCustId><fldContactId></fldContactId><systemdate>20/Aug/2002
> 01:39:27 AM</system
> 
> 
> date><parentuserid><businessid>666777888</businessid></parentuserid><cpid><c
> hpti
> 
> d>AW
> </chptid></cpid><applicationdata><role><idrole>INDUSERAL</idrole></role><me
> 
> nu><mainmenu
> num="1"><idapp>AW</idapp><idtxn>SND</idtxn><pageid>showPymntDtlsPg<
> 
> 
> /pageid><scrnseqno>01</scrnseqno><gifname>top_sendmoney.gif</gifname></mainm
> enu>
> 
> <mainmenu
> num="2"><idapp>AW</idapp><idtxn>RQM</idtxn><pageid>ShowRequestMoneyPag
> 
> 
> e</pageid><scrnseqno>01</scrnseqno><gifname>top_requestmoney.gif</gifname></
> main
> 
> menu><mainmenu
> num="3"><idapp>AW</idapp><idtxn>BPP</idtxn><pageid>allbills_page<
> 
> 
> /pageid><scrnseqno>01</scrnseqno><gifname>top_paybills.gif</gifname></mainme
> nu><
> 
> mainmenu
> num="4"><idapp>AW</idapp><idtxn>PRF</idtxn><scrnseqno>01</scrnseqno><gi
> 
> fname>top_mydata.gif</gifname></mainmenu><mainmenu
> num="5"><idapp>AW</idapp><idt
> 
> 
> xn>TAV</idtxn><pageid>VIEW_TA</pageid><scrnseqno>01</scrnseqno><gifname>top_
> myac
> 
> counts.gif</gifname></mainmenu><mainmenu
> num="6"><idapp>AW</idapp><idtxn>NOT</id
> 
> 
> txn><pageid>NOTIFLIST</pageid><scrnseqno>01</scrnseqno><gifname>top_notifica
> tion
> 
> s.gif</gifname></mainmenu><mainmenu
> num="7"><idapp>AW</idapp><idtxn>LGF</idtxn><
> 
> 
> scrnseqno>01</scrnseqno><gifname>top_signout.gif</gifname></mainmenu></menu>
> <men
> 
> u><submenu
> num="1"><subtxnid>PRF</subtxnid><maintxnid>PRF</maintxnid><menuname>M
> 
> y Profile</menuname><scrseqno>01</scrseqno></submenu><submenu
> num="2"><subtxnid>
> 
> CMP</subtxnid><maintxnid>PRF</maintxnid><menuname>Phone And
> Email</menuname><scr
> 
> 
> seqno>01</scrseqno><pageid>VIEW_CONTACT_MEANS</pageid></submenu><submenu
> num="3"
> 
> ><subtxnid>CSM</subtxnid><maintxnid>PRF</maintxnid><menuname>My
> Schedule</menuna
> 
> 
> me><scrseqno>01</scrseqno><pageid>CONTACT_SCHEDULE_VIEW</pageid></submenu><s
> ubme
> 
> nu
> num="4"><subtxnid>ADD</subtxnid><maintxnid>PRF</maintxnid><menuname>Address<
> /
> 
> 
> menuname><scrseqno>01</scrseqno><pageid>VIEWADDR</pageid></submenu><submenu
> num=
> 
> 
> "5"><subtxnid>RES</subtxnid><maintxnid>PRF</maintxnid><menuname>Related
> users</m
> 
> 
> enuname><scrseqno>01</scrseqno><pageid>VIEWSTATUS</pageid></submenu><submenu
> num
> 
> 
> ="6"><subtxnid>BPS</subtxnid><maintxnid>PRF</maintxnid><menuname>Presentment
> Sch
> 
> 
> edule</menuname><scrseqno>01</scrseqno><pageid>showsch_page</pageid></submen
> u><s
> 
> ubmenu
> num="7"><subtxnid>ASM</subtxnid><maintxnid>PRF</maintxnid><menuname>My Al
> 
> 
> ias</menuname><scrseqno>01</scrseqno><pageid>VIEWALIAS</pageid></submenu><su
> bmen
> 
> u
> num="8"><subtxnid>NOP</subtxnid><maintxnid>PRF</maintxnid><menuname>Notifica
> ti
> 
> on
> Preferences</menuname><scrseqno>01</scrseqno><pageid>NOTIFICATION</pageid></
> s
> 
> ubmenu><submenu
> num="9"><subtxnid>CPN</subtxnid><maintxnid>PRF</maintxnid><menun
> 
> 
> ame>Password</menuname><scrseqno>01</scrseqno><pageid>GETQUESTIONS</pageid><
> /sub
> 
> menu><submenu
> num="10"><subtxnid>CLS</subtxnid><maintxnid>PRF</maintxnid><menuna
> 
> me>Cancel
> Service</menuname><scrseqno>01</scrseqno><pageid>GET_DISBURSE_DETAILS<
> 
> /pageid></submenu><submenu
> num="11"><subtxnid>BUS</subtxnid><maintxnid>PRF</main
> 
> 
> txnid><menuname>Employees</menuname><scrseqno>01</scrseqno><pageid>VIEW_BUSI
> NESS
> 
> _USERS</pageid></submenu><submenu
> num="12"><subtxnid>CSB</subtxnid><maintxnid>PR
> 
> F</maintxnid><menuname>Change Subscription
> Plan</menuname><scrseqno>01</scrseqno
> 
> ><pageid>VIEW</pageid></submenu><submenu
> num="13"><subtxnid>FSM</subtxnid><maint
> 
> xnid>PRF</maintxnid><menuname>My Accounts
> </menuname><scrseqno>01</scrseqno><pag
> 
> eid>VIEW</pageid></submenu></menu></applicationdata><css
> langcss="AW_eng.css" pe
> 
> rscss=""></css><rc returncode="0" errorcode=""
> errormessage=""></rc></faml>
> 
> using XSL file :
> E:\\com\\aliaswire\\datafiles\\AW\\01\\eng\\Access_Email_Add.xsl
> 
> \b Input XSL; Line 1; Column 611
> 
> XSL Error: Could not parse Input XML document!
> 
> XSL Error: SAX Exception
> org.apache.xalan.xslt.XSLProcessorException: An invalid XML character
> (Unicode:
> 
> 0x0) was found in the element content of the document. 
> 
> 
> 
> Any Help Please...
> 
> Regards,
> 
> Nirmal 
> 
>  
> 
>  
> ----------------------------------------------------------------------------
> 
> This message contains privileged and confidential information and is
> intended only for the individual named. If you are not the intended
> recepient you should not disseminate, distribute, store, print, copy or
> deliver this message. Please notify the sender immediately by e-mail if you
> have received this e-mail by mistake and immediately delete this e-mail from
> your system.
> 
> 
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive late or
> incomplete, or contain viruses. The sender therefore does not accept
> liability for any errors or omissions in the contents of this message which
> arise as a result of e-mail transmission.  If verification is required
> please request a hard-copy version.
> 
> 
> --------------------------------------------------------------------------
>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.