Link to home
Start Free TrialLog in
Avatar of rgbcof
rgbcof

asked on

perl, how to get to xml child nodes

<house>
  <rented>
    <name>james</name>
    <name>bob</bob>
  </rented>
  <owned>
    <name>dave</name>
    <name>charles</name>
  </owned>
</house>

@ownedHouses = $xml_root->getElementsByTagName("name");  #will retrieve names from both <rented> and <owned> houses.  How do I get just the owned house ones.
ASKER CERTIFIED SOLUTION
Avatar of clockwatcher
clockwatcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgbcof
rgbcof

ASKER

Ah, getChildNodes was what I was looking for.  That's great.  Thanks.