Not able to parse a string that contains utf8 0xc2 0x85 characters using jdom parser -
i have utf-8 string contains 0xc2 0x85 characters. eclipse treats whitespace. application treats '...'.
since, string xml, i'm using jdom parser , jdom parser fails , gives following exception.
org.jdom.input.jdomparseexception: error on line 1: content not allowed in prolog. @ org.jdom.input.saxbuilder.build(saxbuilder.java:381) @ org.jdom.input.saxbuilder.build(saxbuilder.java:764)
any idea on why jdom parser doesn't treat whitespace? else can have parser validate xml successfully? other elements in xml string seems fine.
whitespace has specific meaning in xml. outside root element in xml characters allowed (#x20 | #x9 | #xd | #xa)+ (space, carriage return, newline, , tab).
the prolog area in xml allowed contain limited structures, , space.
the characters have shown not allowed in valid xml outside root element. sorry.
Comments
Post a Comment