Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > XML MULTI-TABLES parsing and mySQL

Reply
Thread Tools

XML MULTI-TABLES parsing and mySQL

 
 
Federico Bari
Guest
Posts: n/a
 
      01-25-2004
Hi all,

I'm a bigginer using XML with Perl or PHP; I have to manage xml files
storing datas of more than one table (inside the same xml file), and use it
to update a mySQL database (the xml schema is a copy of the mySQL database).
I'd like to know if somebody could suggest an easy and fast way to extract
datas from each table and row or if you can suggest me simple tutorials. For
example is it possible refer to a table inside the xml file calling it by
name? and then extract each row of the table "table_name"? and then call
heach field of the row of "table_name" with its name too ("field_name")?
Thank you very much,

Federico.


 
Reply With Quote
 
 
 
 
James Willmore
Guest
Posts: n/a
 
      01-25-2004
On Sun, 25 Jan 2004 13:15:21 +0100, Federico Bari wrote:

> I'm a bigginer using XML with Perl or PHP; I have to manage xml files
> storing datas of more than one table (inside the same xml file), and use it
> to update a mySQL database (the xml schema is a copy of the mySQL database).
> I'd like to know if somebody could suggest an easy and fast way to extract
> datas from each table and row or if you can suggest me simple tutorials. For
> example is it possible refer to a table inside the xml file calling it by
> name? and then extract each row of the table "table_name"? and then call
> heach field of the row of "table_name" with its name too ("field_name")?


You may want to examine the DBD::AnyData module
(http://search.cpan.org/~jzucker/DBD-....06/AnyData.pm).

This *may* fit the bill for you. I can't say I've used it, but from
reading the documentation, this may be what you're after.

I also suggest you look over
http://learn.perl.org/library/beginning_perl/

This is a tutorial on using Perl.

And ... you can view Perl's documentation online at
http://perldoc.com/

And ... to use the Perl DBI module (which you will need to read up on if
you want to access a database from Perl)
http://dbi.perl.org/

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
Murphy's Law is recursive. Washing your car to make it rain
<doesn't work.

 
Reply With Quote
 
 
 
 
Lance Wicks
Guest
Posts: n/a
 
      01-26-2004
Frederico,

I am by no means an expert, but perhaps DBD::Anydata might be just what
you are after.
It will allow you to access the XML data using SQL commands, you could
then use DBI for all you database access.

Try this url for more info.



Lance

-----Original Message-----
From: Federico Bari [(E-Mail Removed)]
Posted At: Sunday, January 25, 2004 12:15
Posted To: misc
Conversation: XML MULTI-TABLES parsing and mySQL
Subject: XML MULTI-TABLES parsing and mySQL


Hi all,

I'm a bigginer using XML with Perl or PHP; I have to manage xml
files
storing datas of more than one table (inside the same xml file), and use
it
to update a mySQL database (the xml schema is a copy of the mySQL
database).
I'd like to know if somebody could suggest an easy and fast way to
extract
datas from each table and row or if you can suggest me simple tutorials.
For
example is it possible refer to a table inside the xml file calling it
by
name? and then extract each row of the table "table_name"? and then call
heach field of the row of "table_name" with its name too
("field_name")?
Thank you very much,

Federico.





 
Reply With Quote
 
ctcgag@hotmail.com
Guest
Posts: n/a
 
      01-26-2004
"Federico Bari" <(E-Mail Removed)> wrote:
> Hi all,
>
> I'm a bigginer using XML with Perl or PHP; I have to manage xml files
> storing datas of more than one table (inside the same xml file),


There is more than one way data can be stored in an XML file. Just knowing
it is an XML file only gets you 0.1% of the way to knowing how to deal
with it.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What libraries should I use for MIME parsing, XML parsing, and MySQL ? John Levine Ruby 0 02-02-2012 11:15 PM
Parsing XML and storing attributes in MySQL using Perl jkugler Perl Misc 5 06-12-2006 11:32 PM
Parsing XML and storing attributes in MySQL jkugler XML 3 06-12-2006 09:55 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
XML MULTI-TABLES parsing and mySQL Federico Bari XML 0 01-26-2004 08:55 AM



Advertisments