MySQL Forums
Forum List  »  Connector/Node.js

Extract
Posted by: Jason Engel
Date: July 05, 2006 04:26AM

ExtractValue('<a>ccc<b>ddd</b></a>', '/a') AS val1,

Returns

val1 = "ccc"

How would you select that you wanted not just the CDATA but the whole tag?

This would be useful if you where storing book data.

<library>
..<book id="1">
....<title>Book Title</title>
....<author>author1</author>
..</book>
..<book id="2">
....<title>Book Title2</title>
....<author>author2</author>
..</book>
</library>

ExtractValue(<FROM ABOVE XML>, "/library/book:id=1") would not return any useful information.

Options: ReplyQuote


Subject
Written By
Posted
Extract
July 05, 2006 04:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.