How to extract information from self-closing xml elements in vb.net in asp.net? -


for example,

<image><url scope="public" type="string" value"image url"/></image> 

i want extract image url(value of url) element , display image. how can that?

you may use xdocument (linq-to-xml):

dim url string = xdocument.load(new stringreader("<image><url scope=\"public\" type=\"string\" value=\"image url\"/></image>")).descendants("url").attribute("value").value 

check xdocument.load(textreader) method overload documentation.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -