I want to parse some data from an xml file using SAX parser. My xml is as follows:
<categories>
<cat>Pies & past</cat>
<cat>Fruits</cat>
</categories>
In order to parse this data I extend DefaultHandler.
The output after parsing is:
cat 1 = Pies
cat 2 = &
cat 3 = past
cat 4 = Fruits
Why is this happening instead of getting:
cat 1 = Pies & past
cat 2 = Fruits
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…