Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: XPATH Looping

by kcott (Abbot)
on Sep 19, 2012 at 05:38 UTC ( #994405=note: print w/ replies, xml ) Need Help??


in reply to XPATH Looping

G'day medirecpr,

Welcome to the monastery.

I doubt that the code you posted is part of whatever script "works fine". You have two instances of:

find('...

which should probably be

find('...')

Please post a minimal example of code that reproduces your problem. These guidelines will help you in deciding how best to do this: How do I post a question effectively?

-- Ken


Comment on Re: XPATH Looping
Select or Download Code
Re^2: XPATH Looping
by medirecpr (Novice) on Sep 19, 2012 at 11:54 UTC
    Thank you for responding! I did not read before posting. I am copying the script for your review. I can also remove all PHI from the XML and copy it as well. Regards,

      choroba++ has provided the solution below.

      Here's a couple of links you may find useful:

      XML Path Language (XPath)
      This shows the syntax from the W3C Recommendation. Note the difference between //path and .//path.
      XML::XPath - MANIFEST
      This has numerous examples of usage. In the past, I've found the code in the t/ directory particularly useful.

      -- Ken

        I will be reviewing the links today. Also super exited about mastering XML parsing. My intent is to save this information into a database, and then creating an interface for the reports. Thank you for your help!
Re^2: XPATH Looping
by medirecpr (Novice) on Sep 19, 2012 at 14:23 UTC
    I have updated the code and XML example. <<This may be double posted>> Still learning my way around the website. I really appreciate the help. I was not expecting forum members to actually run the code and troubleshoot. More looking for direction. I'll take the troubleshooting though. Kindest regards,

      GOT IT!!!! I figured it out. I'll post the code as it is now and working. Going through the process of explaining the issue really helped. Kindest regards, and thanks to kcott!

        Don't got it. I'll put up the code and explain what is happening again, in the same thread.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-08-21 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (135 votes), past polls