[pmwiki-users] PmWiki as XML source ?

Patrick R. Michaud pmichaud at pobox.com
Fri Jul 20 11:23:36 CDT 2007


On Fri, Jul 20, 2007 at 06:07:07PM +0200, Christophe David wrote:
> >Wouldn't we also need at least a <?xml ...?> tag at
> >the beginning?
> 
> The specs are :
> "The root element can be preceded by an optional XML declaration. This
> element states what version of XML is in use (normally 1.0); it may
> also contain information about character encoding and external
> dependencies.
> 
> <?xml version="1.0" encoding="UTF-8"?>"
> 
> So yes, this may be added.
> 
> 
> >As a start, see
> >  http://www.pmwiki.org/wiki/Test/XMLTest?skin=xml
> 
> I cannot check easly the http header right now, but it needs to be text/XML

I think the canonical form is "text/xml", and yes, the skin is
already setting the http header.

> To please the XML parser, the data may not contain '<' or '>', unless
> enclosed between
> 
> <![CDATA[    and     ]]>
> 
> So we want in this example
> 
> <?xml version="1.0" encoding="UTF-8"?>"
> <PmWikiXML>
> 
> <link><![CDATA[
> <a href='http://www.pmwiki.org/wiki/PmWiki/PmWiki'>PmWiki</a>
> ]]></link>
> 
> 
> <link><![CDATA[
> <a href='http://www.pmwiki.org/wiki/PmWiki/AdminTask'>Admin Task</a>
> ]]></link>
> 
> </PmWikiXML>

Okay, you're asking for something very different from what PmWiki
produces.  PmWiki doesn't have markup rules for producing <link>
elements, or things like <PmWikiXML>, or placing things inside of
CDATA contexts.  We could possibly create such markups, but that's
quite a bit more complex than a simple skin would typically
provide.

It seems that what you're really looking for is something more
along the lines of an RSS feed, which _does_ generate XML output
directly from pagelists.  And feeds.php is fully configurable, 
meaning it's possible to define custom tags and components in 
the XML output.

See http://www.pmwiki.org/wiki/PmWiki/WebFeeds .

Pm



More information about the pmwiki-users mailing list