refix hung parser

This commit is contained in:
Grahame Grieve 2022-09-07 11:13:19 +10:00
parent f30f3e9ca9
commit fc2e2fe9bc
1 changed files with 3 additions and 3 deletions

View File

@ -307,10 +307,10 @@ public class XmlParser extends ParserBase {
Node n = node.getFirstChild();
while (n != null) {
if (n.getNodeType() == Node.TEXT_NODE && !Utilities.noString(n.getTextContent().trim())) {
Node nt = n;
while (nt.getNextSibling() != null && nt.getNodeType() != Node.ELEMENT_NODE) {
nt = nt.getNextSibling();
while (n.getNextSibling() != null && n.getNodeType() != Node.ELEMENT_NODE) {
n = n.getNextSibling();
}
Node nt = n;
while (nt.getPreviousSibling() != null && nt.getNodeType() != Node.ELEMENT_NODE) {
nt = nt.getPreviousSibling();
}