Jsoup : SelectorParseException when colon in xml tag
java, jsoup, xml-parsing
Solution
I used,
documentXmlString = documentXmlString.replaceAll("w:","w");
Problem
Exception is thrown when xml tag has colon, Exception: org.jsoup.select.Selector$SelectorParseException: Could not parse query 'w:r': unexpected token at ':r' XML: ``` <w:r> <w:rPr> <w:rStyle w:val="jid"/> </w:rPr> <w:t>AN</w:t> </w:r> ``` Java code: ``` org.jsoup.nodes.Document doc = Jsoup.parse(documentXmlString); ``` Here documentXmlString has the xml specified above