I try to parse XML in java by
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new ByteArrayInputStream(msg.getBytes("UTF-8")));
Everything seems to be ok, also
<data>äöü</data>
is parsed correctly (esp. concerning the german umlauts).
But when I try to parse
<däta>xxx</däta>
the parser throws an exception, names with umlauts in it seem to not work.
What to do?
No comments:
Post a Comment