Re: Saving XML to db



I would use a Native XML data base like Apache.org's Xindice (http://xml.apache.org/xindice/) or DBXML (http://www.dbxml.com/)

The advantage is the DOM of the XML is stored not the textual strings, so you can search the XML data in the database using XML
constructs like XPATH (very cool).

I think both os these run in either the Jetty Java servlet container or under Tomcat.

I've heard, but not confirmed, that Oracle 8 and above can also provide an XML schema capable of the same functions.



On Fri, 11 Feb 2005 18:15:00 -0000, "simon" <spambucket@xxxxxxxxxxxx> wrote:

>Hi All,
>
>What would be the best way to save XML to a database?
>
>I mean I can use the example
>'http://www.php.net/manual/en/function.mysql-real-escape-string.php'.
>
>they give a function to prevent any SQL Injection,
>
>function quote_smart($value)
>{
> // Stripslashes
> if (get_magic_quotes_gpc()) {
> $value = stripslashes($value);
> }
> // Quote if not integer
> if (!is_numeric($value)) {
> $value = "'" . mysql_real_escape_string($value) . "'";
> }
> return $value;
>}
>
>but then how do I get the data back, (as intended), from the db?
>what would be the reverse of the above code?
>
>Many thanks
>Simon
>

.



Relevant Pages

  • Re: DISCOVER_XML_METADATA
    ... expansion of ASSL XML returned by the server. ... You could do ExpandObject for the server in step 1. ... you could request ExpandObject for that database -- this is step ... all cubes and nothing else. ...
    (microsoft.public.sqlserver.olap)
  • Re: Preservation of namespace prefixes in XML datatype
    ... representation well beyond merely preserving the logical meaning. ... > Now the ANSI/ISO SQL-2003 standard makes it pretty clear that the XML ... all the guarantee the database gives you is that we preserve the ... >> makes changes in namespace prefixes, will I the user/developer have the ...
    (microsoft.public.sqlserver.xml)
  • Re: Wanted:MAIL.MAI structure definition
    ... a relational database is more flexible in the retrival of data. ... Perhaps this impact has been softened as hardware has gotten faster, but, overhead is overhead, and if you weren't using the advances in hardware for overhead, those designs that have less overhead would also gain from the faster hardware. ... RFC822 header because your XML parser wouldn't be able to understand new ...
    (comp.os.vms)
  • Re: Rework [Was: Static vs. Dynamic typing...]
    ... Agile projects have an extraordinarily low chance of a big change. ... Suppose you start with XML files, and by Iteration 6 the ... Switching to a database is now cheaper than morphing XML files into a ...
    (comp.programming)
  • Re: Data source options
    ... > customer to access the app and own the data. ... and by keeping the "main database" closer to the "web application ... I've been watching the "maturation" of the XML space. ... Visage ISN'T free - but it is cheap as chips ...
    (comp.databases.pick)