QuietRiot
Well-known Member
- Joined
- May 18, 2007
- Messages
- 1,079
- Office Version
- 365
- 2021
- Platform
- Windows
- MacOS
I'm trying to get the href value (the url for the next page) of the next position in the below XML, but I can't figure out how to get that attribute.
edit: not sure why it wont show the xml tags changed it a bit:
thanks,
edit: not sure why it wont show the xml tags changed it a bit:
Code:
{api:pagination results-count="200" items-per-page="25"}
{api:page position="this" href="https://test.com/api/test/12345"/}
{api:page position="next" href="https://test.com/api/test?detail=full"/}
{/api:pagination}
Code:
objHTTP.Open "GET", URL, False
objHTTP.setRequestHeader "Authorization", Auth_Key
objHTTP.send
'strResult = objHTTP.responseText
objXML.async = False
objXML.LoadXML (objHTTP.responseText)
'Dim xItemList As IXMLDOMNodeList
'Set xItemList = objXML.DocumentElement.SelectNodes("//api:page")
Dim xItem As IXMLDOMNode
xItem = objXML.SelectSingleNode("//api:pagination/page").Attributes.getNamedItem("href")
'xItem = objXML.SelectSingleNode("//api:pagination/api:page[@position=""next""]"
thanks,
Last edited: