I'm trying to select on an attribute within an XML node like this one here:
<tdf:TrustedDataObject xmlns="urn:com:bank:baml:tdf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" >
I'm able to find the node using Firepath with something like this:
/*[local-name()='TrustedDataObject']
But if I wanted to select on an attribute within the node, like the gml attribute, I'm not sure how to do this. I've tried a few different ways like:
/*[local-name()='TrustedDataObject']/@gml
or
/*[local-name()='TrustedDataObject'][gml]
And they don't match anything.
Does anybody have some suggestions? I know this isn't complete code, I don't have access to the entire document right now so I apologize.
EDIT- Ok, I wasn't sure if I should start another question or just edit my original. I understand that there are limitations when trying to access the namespace attributes, but really what I was trying to do was create a content node on the attributes in NoticeText like - ownerProducer and pocType.
<document>
<tdf:TrustedDataObject xmlns="urn:com:bank:baml:tdf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" >
<ism:Notice ism:classification="X" ism:ownerProducer="ABC" ism:noticeType="POC" ism:externalNotice="true">
<ism:NoticeText ism:classification="X" ism:ownerProducer="ABC" ism:pocType="JJJ-710">John Smith, Walmart, jsmith@walmart.com</ism:NoticeText>
</ism:Notice>
</tdf:TrustedDataObject>
<document>
Again, I would think being able to traverse down to the NoticeText node, using local-name() should work. Something like this?
//*[local-name()='NoticeText']/@ownerProducer
Thanks again for the help. Maybe you're telling me that all of these attributes aren't accessible via xpath...