keyongtech


  keyongtech > php > 01/2004

 #1  
01-07-04, 09:59 AM
Leo Heber
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
 #2  
01-07-04, 07:06 PM
ChronoFish
"Leo Heber" <le_he_> wrote in message news:a56d
> 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 [url down] 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
Similar Threads
Complex mapping

Hi, I am fairly new into BizTalk and I would like some advise into how to design complex mapping. More requirements being added with time made that I had to review...

Complex mapping

I have a question on how to map a certin set of data from one structure and a database lookup to an output structure. Below are the details 1. Receive inbound data that...

Mapping complex

In Biztalk, source schema i have a sequece group (max ocrrur = *) and output schema is a record (max occur = *). How to map to get multiple looping recores. NOw I only get...

Complex mapping

Hi All, How do I map many source records to single target record in mapping. I have input/source file schema which has multiple records of same type. I Need to transform it...

Complex Mapping

What I'm looking forward to is a functoid which can deflatten my input XML. My requirement requires multiple input xml scanning to generate the output xml. Following example...


All times are GMT. The time now is 09:46 PM. | Privacy Policy