FILTERXML

FILTERXML(xml, xpath)

Returns the specific data from the xml content by using xpath.

xmlA string in xml format.
xpathA string in xpath format.

REMARKS
* This function is often used in conjunction with the WEBSERVICE function.
* The "xml" must be less than 255 characters.
* If "xml" is not valid, then #VALUE is returned.
* If "xml" contains a namespace that is not valid, then #VALUE is returned.
* This function was added in Excel 2013.
* For the Microsoft documentation refer to support.microsoft.com

 A
1=FILTERXML( WEBSERVICE("http://www.bettersolutions.com/ excel/xml/example.xml"), "//city/name") = "#VALUE!"
2=FILTERXML("<menu> <food><name>Pizza</name></food> </menu>", "//food/name") = Pizza
3=FILTERXML("<menu> <food><name>Pizza</name></food> </menu>", "//food[2]/name") = Pizza
4=FILTERXML("<menu> <food><name>Pizza</name></food> </menu>", "//food["&ROW()&"/name") = Pizza

1 - Take the first tag "city" and return the contents from the name node.
2 - Returns the name from the second node.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top