update tbl_xml set mov_vcds.modify('replace value of(/videos/video/title/text())[1] with "Anbu"')
without text() can we use this query..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s unfortunately very common to see “text()” used in this way at the end of a path expression where it is unnecessary and occasionally harmful. Usually you can use the element node itself in contexts where you are referring to the content of the element. There are a few exceptions, for example in an element constructor
and
do different things (the first gives you
<title><title>original title</title></title>). But in this case it’s usually better to usetitle/string()because that copes better with nested comments, mixed content, etc.