Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: XPATH Looping

by kcott (Chancellor)
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:


which should probably be


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

Replies are listed 'Best First'.
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.
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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994405]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2018-05-27 03:49 GMT
Find Nodes?
    Voting Booth?