in reply to Re: Tokenizing XML
in thread Tokenizing XML

Not quite...

As I need it inside a macro and I just want to locate elements etc. a pure perl parser is helpfule for analysing the source and maybe taking parts of it, but from a first glance at it, I think it's way too much.

As a matter of fact, my "parser" need not choke on invalid xml. The macro will be used when editing XML and so the XML might well be invalid. I rely on other plugins of the editor to report invalidity. Unfortunately I have no idea (yet) how to utilize these other plugins (which already parse the xml) so I came up with my regex in order to find whatever the macro searches for.

Nevertheless: Thanks for pointing me at the modul.


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e