question

mblock avatar image
mblock asked

Retrieve an attribute value from xml string

I am new to the parsing of xml strings. I have been trying different things as posted from earlier questions, but I cannot seem to get anything to work. All I really want is to extract the valued highlighted below: ** **
tsqlxml
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mblock avatar image mblock commented ·
I guess it didn't work to highlight or bold. I am looking for the value of the attribute "number".
0 Likes 0 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
What datatype is the string in? When I try and cast that as xml, I get an error as the 'xs' namespace isn't defined. And when you say you want the value of the attribute "number", what exactly are you expecting?
0 Likes 0 ·
mblock avatar image mblock commented ·
Here is the actual xml string. In this case I would expect to see *5558.
0 Likes 0 ·

1 Answer

·
mblock avatar image
mblock answered
Here is the full xml string. Wouldn't let me post in the comments.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev Riley avatar image Kev Riley ♦♦ commented ·
Can you retry - there's nothing in that text?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.