[xml] help : how to use the parser lib in perl



Please forgive me if this Query is stupid

we are using sun OS 5.8.
 
     we want to convert a xml data into csv file
format using perl.
Thst is Perl should internally call c libs and do the
parsing of data from a xml file and put in a flat file

Example 

for example 
    consider the file address.xml
    <header1>
        <header2>
            <name>Sriman</name>
            <address1> No140 marshalls road</address1>
            <city>chennai<city>
        </header2>
        <header3>
            <name>Kannan</name>
            <address1> No 10 evc road</address1>
            <city>chennai 5<city>
        </header3>
    </header1>

we want this data at address.txt in 

        Sriman  No140 marshalls road  chennai
         Kannan   No 10 evc road  chennai 5

Format 

I have tryied with parser but the path is not set i
believe.
If the parser is XML::DOM that will be better for me.

when i search in CPAN.org, it is having may xml_mod
that is confusing me.

please advice what are all the steps to be followed to
get , install and test the parser.




(  Actually we did something like this we have
installed a parser libs and try to "USE XML::DOM" but
it is giving error like
Can't locate XML/DOM.pm in @INC (@INC contains:
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris
/usr/perl5/site_perl/5.005 .) at test.pl line 2.
BEGIN failed--compilation aborted at test.pl line 2.
.)
we want to know what are the steps to be
followed to install the parser.
And which parser will be suitable for my requirement.
 
Please advice
 
thanks 
 
govind

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]