By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,244 Members | 1,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,244 IT Pros & Developers. It's quick & easy.

perl xpath based

P: 19
Hi all

I have doubt in perl script within XML.

This is XML data:

Expand|Select|Wrap|Line Numbers
  1. <float id="1" type="box"><float id="2" type="need"><float id="3" type="new">Although there are a number of commercial sites that have free legal information, FindLaw (<uri km="Bm.Ap.A_1.A_URL.A.URL" xlink:href=""></uri>)</float></float><float type="web">(<uri km="Bm.Ap.A_1.A_URL.A.URL" xlink:href=""></uri>)</float></float>
  3. <fig id="1" type="box"><fig id="2" type="need"><fig id="3" type="new">Although there are a number of commercial sites that have free legal information, FindLaw (<sum km="Bm.Ap.A_1.A_URL.A.URL" xlink:href=""></sum>)</fig></fig><fig type="web">(<uri km="Bm.Ap.A_1.A_URL.A.URL" xlink:href=""></uri>)</fig></fig>

I want to select the content from the above sample for xml, only if the node with attribute value type is equal to "need" (type="need") with related closing tag. I cant specified any tag, attribute only specified.

or any module is there.

Pls advice

thanks in adv


Mar 13 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 410
For reading the contents from your XML file, you can use either XML::Simple or XML::Parser
Mar 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.