deaconb
Canvas Initiate

Xpath in XML Query for attachment file names of SharePoint Item

Hi Everyone,

 

I'm trying to query attachment file names items in a SharePoint list. I've got the xml content I need (I think), but there's an "m: properties" item in front of the data I want (FileName). I tried searching various sources but couldn't figure out how to get around the "m:properties" to get to FileName. 

 

Based on some other posts, here's what I've tried so far with no luck: 

//d:FileName

- //*[local-name()=FileName]

 

Here's a snippet of the xml: 

<m:properties><d:FileName>IF_MIDAS_1page.pdf</d:FileName><

 

Can anyone help me handle the "m:properties" properly to get to the file name?  

 

Thanks!

0 Kudos
Reply
3 Replies
SimonMuntz
Nintex Employee
Nintex Employee

Re: Xpath in XML Query for attachment file names of SharePoint Item

Hi,

Are you able to provide all the XML that you are working with?
0 Kudos
Reply
deaconb
Canvas Initiate

Re: Xpath in XML Query for attachment file names of SharePoint Item

Sure thing! It's attached now.

 

The api I'm using is: _api/web/Lists/getbytitle('ListTitle')/items(CurrentItemID)/AttachmentFiles

 

I could go one step further and do $select but it doesn't seem to get ,me out of the "m properties" thing. 

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Xpath in XML Query for attachment file names of SharePoint Item

HI.

My test showed that the following Xpath Worked.
/defaultNS:feed/defaultNS:entry/defaultNS:content/m:properties/d:FileName
0 Kudos
Reply