E
Eileene Cordoves
hi i'm a newbie in xml and we're using
org.apache.xerces.parsers.SAXParser.
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.parser.v2.XMLParseException: Invalid char in text.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:205)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPars
er.java:270)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:147)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:430)
.....
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.
org.apache.xerces.parsers.SAXParser.
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.parser.v2.XMLParseException: Invalid char in text.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:205)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingPars
er.java:270)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:147)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:430)
.....
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.