How to make SAXParser ignore escape codes

后端 未结 4 669
没有蜡笔的小新
没有蜡笔的小新 2021-01-22 22:06

I am writing a Java program to read and XML file, actually an iTunes library which is XML plist format. I have managed to get round most obstacles that this format throws up exc

4条回答
  •  无人及你
    2021-01-22 22:35

    I am parsing the below string using SAXParser

    
    &<
    test
    
    I want the same string to be retained but it is getting converted to below
    
    &<
    test
    
    Here is my code. How can I avoid this being converted?
    SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser saxParser = factory.newSAXParser();
            MyHandler handler = new MyHandler();  
            values = handler.getValues();
            saxParser.parse(x, handler);
    

提交回复
热议问题