[bdbxml] using DBXML API to query an Xml Doc
"sarigiannis xaralampos" <hsarigiannis-taE2apzES20Cep0kKqy/[email protected]>
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi
I implemented a system that in order to render some xml files i used Xquery
to get docs from the database and after follow on queries to get the
specific values from the docs so as to render as needed.
I wanted to make my system distributed by having the part of getting the
doc from the database in the one side and the part of doing the follow on
queries in the other side .I separated the system having the Xml Server in
the one side and the application that uses the Xml files of the server. I
did it using a web service architecture .
I was asking via a soap msg the appropriate xml doc .After I used Berkeley
DBXML API to convert this (String)Xml Doc to an XmlDocument , after I
was making a new XmlValue and finally I was making my Query.
XmlManager theMgr = new XmlManager();
XmlDocument Doc=theMgr.createDocument();
Doc.setContent(""<aDoc><title>doc1</title><color>green</color></aDoc> ");
XmlValue value=new XmlValue(Doc);
XmlQueryContext Context = theMgr.createQueryContext();
XmlQueryExpression Expression = theMgr.prepare(" //color ",
Context);
XmlResults Results = Expression.execute(value, Context);
My question is if using DBXML API to query over an Xml doc without it being
in the database is efficient ????
Instead of it I could use Xalan engine .
I decided to use DBXML API instead of Xalan engine as two queries over my
Doc are enough to render my XmlDoc.
Any comparisons between Xalan and DBXML API for rendering Xml docs are
accepted .
Thanks a lot
charris