Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMl element value getting truncated.

Status
Not open for further replies.

jojoseph

Programmer
Aug 16, 2005
2
GB
I am trying to parse a clob from a table in oracle database, on unix box (its a live box and no debug options)
following is what I am doing. I am extending default handler.


public void characters(char[] arg0, int arg1, int arg2) throws SAXException
{
String text = new String(arg0,arg1,arg2);
String errNum = null;

if(harvest==true)
{
errNum=text;


qsType = (String)errNumbers.get(errNum);
harvest=false;
}
if(shallWrite == true)
{
write(text);
}

}

but randomly the value (text) is getting truncated like

a value present as 5012 becomes 50 or 7114 becomes 711

I am not able to to make out what is happening. any help would be highly aprciated.

I spooled the clob into a file and ran it windows environment and it worked fine.
 
I think this is more a question for the Java forum

Anyway, maybe the error is not in the piece of code you're showing. I'd print the arguments of the function when it begins.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top