On Monday, 7 May 2018 at 19:46:00 UTC, Jesse Phillips wrote:
So I have an XML like document which fails to adhere completely to XML. One of these such events is that & is used without escaping.

My observation is that after the exception it is possible to move to the next element without issue. Is this something expected and will be maintained?


    try {
        range.popFront();
    } catch (Exception e) {
        range.popFront;
    }

Ok so this worked when inside a quoted attribute value but not a normal tag body. Clearly I'm not parsing valid XML so I'm going outside the bounds of valid parameters. But rather than writing a custom parser to handle this, it would be nice to have:

     try {
         range.popFront();
     } catch (Exception e) {
         range.moveToNextTag();
     }

Which would make front a MalformedParse containing the content up to the next <.

Reply via email to