Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've configured a 'List' and one of its types is 'Hyperlink or Picture'.

As I'm populating this List type I'm required to enter the 'Web address' & 'description' :

enter image description here

When I access this List via its rest web service the 'web address' & 'description' is within the same image tag separated by a comma :

<d:Image1>http://myurl//myimage.jpg, description 1</d:Image1>

How can the image url be just returned and not the description, is it possible to separate these two values into separate xml fields ?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Both are useful, depending on what you need to do with the returned data. With all the web services, I usually use jQuery and would just do a .split(", ")[0] or .split(", ")[1] to get the appropriate peice of the data.

If you are processing via xslt, then you do a substring-before(@thefeld, ", ")or substring-after(@thefeld, ", ").

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.