Skip to Content
0
Former Member
Jan 14, 2008 at 01:15 PM

Java SAX mapping "&" problem

38 Views

Hi, I'm using SAX mapping, but in case that some field has "&" as content, for example company name,

public void characters(char buf[], int offset, int len)

throws SAXException {

String s = new String(buf, offset, len);

}

for string "name m&s" returns only "s". It loops(splits this string into 3) trough:

1. "name m"

2. "&"

3. "s"

and in this case, I get only "s" what is completely wrong. How to avoid that?

br

mario