Hi Alex, > I suggest to slightly modify that loop > > (make > (loop > (NIL (link (char)) (quit "Unbalanced CDATA")) > (T (= '`(chop "]]>") (tail 3 (made)))) ) ) ) )
I changed the error message to (quit "Unbalanced XML CDATA") so that I can use (catch '("XML") ...) I also added the NIL case to prevent infinite loop in DOCTYPE: (loop (T (= "]" (setq X (from "]" "\"" "'" "<!--")))) (case X ("\"" (from "\"")) ("'" (from "'")) ("<!--" (from "-->")) (NIL (quit "Unbalanced XML DOCTYPE")) ) ) > Thanks! I include again a new version with the above fix. The updated file is attached. Cheers, Tomas
xml.l
Description: Binary data