Forum OpenACS Q&A: XML and OpenACS

Collapse
Posted by Michael Feldstein on
It seems to me that we have the same problem with XML that we have with
Java; namely, that ACS Classic uses the parser built into Oracle. Has
anyone thought about ways to plug an XML parser into OpenACS? Is there
an XML module for AOLServer yet?
Collapse
Posted by Ben Adida on
That is an ACS classic issue, indeed. XML parsing can be pretty intense. Why do that in the database that is already the bottleneck in terms of speed? Instead, use the AOLserver interface to libxml, written by ArsDigita, available at arsdigita.com/download. This allows you to parse XML right from Tcl. We're using it on the latest OpenForce/OpenACS backed web site.
Collapse
Posted by Michael Feldstein on
I'm guessing that the solution you're describing is the same as the one described by Karl Goldstein. He indicates that the solution currently "is suitable only for simple XML documents," "ignores DTDs", and "cannot be used to validate documents." It seems to me that these limitations could be serious in certain contexts. Is there a way around these problems?
Collapse
Posted by Aaron (WRONG ACCOUNT) Swartz on
No, the one Karl refers to is an XML parser written entirely in Tcl.
The ns_xml module is based on the GNOME libxml (IIRC) and is
a complete, XML/DOM parser without the limitations you
mention.
Collapse
Posted by Krzysztof Kowalczyk on
ns_xml is indeed based on libxml (www.xmlsoft.org) however the last time I checked (a month ago maybe) it's based on the older 1.x version of the library and doesn't implement all of the features (eg. validation).
Collapse
Posted by Michael Feldstein on
Is it safe to assume that updating the AOLServer interface to work with the latest version of the library wouldn't be a huge task for a decent C programmer?
Collapse
Posted by Krzysztof Kowalczyk on
In MHO it's very easy - just wrapping C function with Tcl interface.
Collapse
Posted by IDiscovery Support on
Would it be possible to use the Expat processing of Apache
with the Apache version of OpenACS?
Collapse
Posted by Krzysztof Kowalczyk on
XML processing is independend of OpenACS i.e., OpenACS doesn't use any special XML stuff. This means you don't have to run any XML stuff for running OpenACS. You can probably use whatever XML parsing option is available in Apache to build whatever you want to build on top of OpenACS.