Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

XPATH select where an attribute doesn't exist

spilgrimJan 25 2007 — edited Jan 26 2007

Hi All,

How can I select out an element where an attribute does not exist?

eg:

<Item Block="MYBLOCK">
<Properties>
<Property Name="ScrollbarXPosition">5542</Property>
<Property Name="ScrollbarYPosition">903</Property>
<Property Name="RecordVisualAttributeGroupName">EMPHASIZE</Property>
</Properties>
</Item>
<Item Block="MYBLOCK" Name="ITEM1">
<Properties>
<Property Name="RecordVisualAttributeGroupName">CG$TEXT_ITEM</Property>
<Property Name="VisualAttributeName">CG$TEXT_ITEM</Property>
<Property Name="PromptVisualAttributeName">PROMPT_NORMAL</Property>
</Properties>
</Item> 

What I would like to do is select the Elment RecordVisualAttributeGroupName from the first elements where the Item Block="MYBLOCK" and Name is NULL. I've had a look through XPATH and can't find the function.

Something along the lines :

Item[@Block='MYBLOCK' and Name IS NULL]/Properties/Property [@Name='RecordVisualAttributeGroupName']/text()"

regards,
Steve

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2007
Added on Jan 25 2007
2 comments
12,109 views