Re: Saving XML to db
- From: Michael Hare <mphare@xxxxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 10:23:49 -0500
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
>
.
- Prev by Date: Re: Running PHP on a client only...
- Next by Date: mass newsletter
- Previous by thread: session_start() error
- Next by thread: mass newsletter
- Index(es):
Relevant Pages
|