Java SAXParser parsing invalid xml [duplicate]
问题 This question already has answers here : How to parse invalid (bad / not well-formed) XML? (4 answers) Closed 2 years ago . I'm trying to parse some xml which is invalid as the attributes are not in quotes, is there any way of getting around this? A simple example of this below, as well as the java code. XML <car id=1> . . </car> Java SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false); SAXParser saxParser = factory.newSAXParser(); saxParser.parse(page,