Second "RFC" on pkg-data idea for ports

StefanEßer se at
Wed Apr 14 09:19:45 PDT 2004

On 2004-04-14 02:03 +0200, Martin <nakal at> wrote:
> > Would it be useful-enough if the pd-handling program
> > could spit out a true XML-formatted document, once we knew
> > what that was?  I realize this is rather lame, but it would
> > allow us to keep this key program pretty small and simple.
> I think, XML is good for writing out things. You can
> simply use fprintfs to spit out the data. It is normal to
> do that. It would be a good idea to have a good DTD
> or a XML-schema to parse it later. Having this few things
> in mind, you can just start with a XML-prologue, then
> the DOCTYPE and then whatever you want (as long as it's
> well-formed and valid XML).

I've developed an XML based web-application during the last
few months (which is using XML for configuration data and to
generate, transform/process and display content).

Based on my experiences, I'd rather not generate XML data 
with printf(), since you have to be careful to encode special
characters correctly and the XML serializer does this for you
(including support for UTF-8, if desired).
In fact, I found that building a DOM tree in RAM using libxml2
calls is quite simple.

My suggestion is to use libxml2/libxslt which are fast, actively
maintained and come with acceptable licences (BSD style).

Regards, STefan

More information about the freebsd-current mailing list