Да, это возможно и не очень сложно:
data: {...}
ws-chars: charset " ^/^M^-"
ws: [any ws-chars]
rule: [
ws <Multipage> any [
ws "<tab" opt [ws "id=" copy id to ">" (print ["tab id:" id])] ">" any [
ws "<box" opt [ws "id=" copy value to ">" (print ["box id:" id])] ">"
opt [copy text to "<" (if text [?? text])]
</box>
]
ws </tab>
]
ws </Multipage> ws
]
parse/all data rule
Запустив этот код, вы получите в качестве вывода:
tab id: "1"
box id: "1"
text: "^/ "
tab id: "2"
box id: "2"
text: "^/ Hello^/ "