XmlSlurper を使用してダーティ html ページを解析すると、次のエラーが発生します。
ERROR org.xml.sax.SAXParseException: Element type "scr" must be followed by either attribute specifications, ">" or "/>".
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
...
[Fatal Error] :1157:22: Element type "scr" must be followed by either attribute specifications, ">" or "/>".
今、私はそれをフィードし、そうする前にそれを印刷するhtmlを持っています。それを開いて、エラー 1157 に記載されている行に移動しようとすると、そこに「src」はありません (ただし、ファイルにはそのような文字列が何百もあります)。したがって、行番号を変更する追加のものが挿入されていると思います(おそらく<script>
またはそのようなもの)。
問題のある行または html 部分を正確に見つける良い方法はありますか?