Contents
XML Parser
Description
The XML parser allows you to have XML rendered nicely inside Moin's code blocks.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
1.0 |
1.5 |
Installation
For general installation instructions, see ParserMarket/InstallingParsers. This parser requires no special dependencies, such as outside Python libraries.
Usage
To use this parser, simply put #!xml after the beginning of the code block.
Example
{{{#!xml <?xml version="1.0" encoding="UTF-8"?> <!-- This is a comment. --> <name attribute="value">content</name> }}}
Copyright
This parser is copyrighted by DavinDubeau
License
This parser is released under the terms of the GNU GPL.
Discussion
We need a much better XML parser. This one does not seem to work under 1.5.3. Error message is maximum recursion limit exceeded. See also http://stux.wikiinfo.org/moin.py/Tools/login.xml -- ThiloPfennig 2006-05-24 15:22:13
Ideas
This plugin should rather use some XML mechanism rather the regular expressions. (Quote: "Note that parsing HTML or XML with regular expressions is painful. Quick-and-dirty patterns will handle common cases, but HTML and XML have special cases that will break the obvious regular expression; by the time you've written a regular expression that handles all of the possible cases, the patterns will be very complicated. Use an HTML or XML parser module for such tasks.", source: http://www.amk.ca/python/howto/regex/)
- The problem with using a "real" XML parser is that those don't accept fragments. Explaining an XML file in small chunks would be impossible. The Java parsers accept this.
- maybe strip linefeeds before displaying as those should not be of interest?