XML 2 SQL without complex mapping

This is a discussion on XML 2 SQL without complex mapping within the PHP Language forums, part of the PHP Programming Forums category; Hello, I need a tool (preferable in PHP to run on every webserver or very easily accecable by PHP) which ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-2004
Leo Heber
 
Posts: n/a
Default XML 2 SQL without complex mapping

Hello,

I need a tool (preferable in PHP to run on every webserver or very
easily accecable by PHP) which can convert data from XML to a
relational DBS (MySQL). I donnot want to stick around with complex
mapping rules, XSLT stuff or XML query languages. The XML should be
mapped automatically to tables. It might be nice, but its not
necessery, to do it the other way round.

Does anyone knows tools (phpscripts) to do this?

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-07-2004
ChronoFish
 
Posts: n/a
Default Re: XML 2 SQL without complex mapping


"Leo Heber" <le_he_@gmx.de> wrote in message news:2229f921.0401070159.2bbda56d@posting.google.c om...
> Hello,
>
> I need a tool (preferable in PHP to run on every webserver or very
> easily accecable by PHP) which can convert data from XML to a
> relational DBS (MySQL). I donnot want to stick around with complex
> mapping rules, XSLT stuff or XML query languages. The XML should be
> mapped automatically to tables. It might be nice, but its not
> necessery, to do it the other way round.
>
> Does anyone knows tools (phpscripts) to do this?
>
> Thanks



Personally I have not seen nor looked for such a tool. I know most of today's DB go from table->XML pretty easily, but I have not
seen it the other way.

I assume you would want it to build relations for you and the whole bit?

<users>
<userInfo>
<Name>First guy</Name>
<Address>14 Summer Lane</Address>
<Phone>
<daytime>303-555-1212</daytime>
<evening>404-555-1212</evening>
</Phone>
</userInfo>
<userInfo>
<Name>Second guy</Name>
<Address>96 Bullers Parkway</Address>
<Phone>
<daytime>303-555-1414</daytime>
<evening/>
</Phone>
</userInfo>
</users>

would somehow translate to

Table users:
id |userInfo
1 | 1
2 | 2

Table userInfo:
id | Name | address | Phone
1 | first guy | 14 Summer Lane | 1
2 | Second guy | 96 Bullers Parkway | 2

Table Phone
id | daytime | evening
1 | 303-555-1212 | 404-555-1212
2 | 303-555-1414 |

In the most simple of cases like the above it probably wouldn't be too hard to code it up. Ideally the API would be able read the
DTD and code the DB schema from it.

To not leave you totally hanging, try ActiveLink http://www.active-link.com/intranet/software.php which provides an API into an XML
database which I think would be the hardest part of this project. This API has the advantage that it can be installed anywhere and
you are allowed to re-distribute it.

-CF


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:15 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0