Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Perl section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 11th, 2007, 02:34 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML parsing

Hi All,

Can anybody plz help me for writing code for parsing the XML document using XML::Parser::Grove module..
I am searcing for some online books also ..but I am not able to find any tutorials also.

I have one task to do using that module
i.e

I need to parse an XML file using XML::Parse::Grove Module
I need to search over all the nodes in the XML file and then I get any path I need to validate that path if it exists


Please help me out

I am attaching the XML code,I just want to parse that XML code

<xml version="1.0" encoding="iso-8859-1">
<Animal name="" version="1.0">
  <Sources>
        <Source>
            <param name="name">animalplanet</param>
            <param name="type">database</param>
        </Source>
        <Source>
            <param name="name">animal_source</param>
            <param name="path">/home/denzil/tmp/</param>
            <param name="type">xml</param>
        </Source>
        <Source>
            <param name="name">horse_source</param>
            <param name="path">/home/denzil/Anim/Test</param>
            <param name="type">xml</param>
        </Source>
  <Destinations>
        <Destination>
            <param name="name">dest_hor</param>
            <param name="type">xml</param>
            <param name="source">/usr/bin/test</param>
            <param name="destdir">/home/cactus/temp</param>
        </Destination>
  </Destinations>
  <Options>
        <Path>
            <param name="infile_path">/home/anim/in</param>
            <param name="outfile_path">/home/anim/out</param>
        </Path>
  </Options>
</Configuration>
</xml>

I need to extract the path shown in particular nodes for sure Tell me How to write the code
OR PLEASE SEND ME resources or links for that





Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing the xml which is having vikkiefd XML 14 July 28th, 2008 05:21 AM
parsing xml kri_hegde XML 5 July 24th, 2007 11:37 AM
XML Parsing SCADA_Monkey XML 2 March 11th, 2007 03:20 PM
XML Parsing tgopal Javascript 2 July 27th, 2004 08:54 AM
XML Parsing tgopal .NET Web Services 1 June 15th, 2004 03:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.