accessing akward attribute
Posted: Wed Jul 26, 2006 1:35 am
Hello
I have an xml document that looks similar to this template
<Library>
<book bookNum ="1" bookLength="300">
<author> some dude </author>
</book>
<book bookNum ="2" bookLength="100">
<author> anouther guy </author>
</book>
etc...
</Library>
My question is how do i get the attribute book Length from the first book?
The information is held on an XML database and my query looks like this
Select *
From MYTABLE
WHERE extractValue(OBJECT_VALUE, 'Library/book[1][@bookLength]') == 100;
I basically want to extract all the libraries from my database that contain a book of 100 pages.
Can anyone help?
Thanks
I have an xml document that looks similar to this template
<Library>
<book bookNum ="1" bookLength="300">
<author> some dude </author>
</book>
<book bookNum ="2" bookLength="100">
<author> anouther guy </author>
</book>
etc...
</Library>
My question is how do i get the attribute book Length from the first book?
The information is held on an XML database and my query looks like this
Select *
From MYTABLE
WHERE extractValue(OBJECT_VALUE, 'Library/book[1][@bookLength]') == 100;
I basically want to extract all the libraries from my database that contain a book of 100 pages.
Can anyone help?
Thanks