I have the following XML:
<Product>
...
<TitleDetail>
<TitleType>01</TitleType>
<TitleElement>
<TitleElementLevel>01</TitleElementLevel>
<TitleText>This is the title I'm looking for</TitleText>
</TitleElement>
</TitleDetail>
...
</Product>
(This is ONIX , if you're interested.)
I want to extract the type 01 header. I tried:
say $dom->at('TitleDetail[TitleType="01"] > TitleElement > TitleText')
but that will not work. It seems that the syntax tag[attr=value]really only works for attributes.
Is there an easy way to do what I want?
mscha source
share