hi i'm a newbie in xml and we're using
org.apache.xerc es.parsers.SAXP arser.
anyone know what the invalid characters in xml are?
one of the value in the parsed xml is '<space><space> 1', we trimmed the
whitespaces while constructing the xml and there are no errors.
however, if it is not trimmed prior to xml construction, and we placed
the trim function in character method such that:
public void characters (
char buf []
, int offset
, int len
) throws
SAXException
{
String s = new String(buf, offset, len).trim();
......
}
i'm getting the error:
oracle.xml.pars er.v2.XMLParseE xception: Invalid char in text.
at oracle.xml.pars er.v2.XMLError. flushErrors1(XM LError.java:205 )
at
oracle.xml.pars er.v2.NonValida tingParser.pars eDocument(NonVa lidatingPars
er.java:270)
at oracle.xml.pars er.v2.XMLParser .parse(XMLParse r.java:147)
at org.xml.sax.hel pers.ParserAdap ter.parse(Parse rAdapter.java:4 30)
.....
what's the diff bet the two ways of trimming spaces?
in case helpful: the encoding specified in the xml header is UTF-8.
any ideas?
thanks in advance.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!