Home > Mobile >  Google sheets IMPORTXML Query get attribute with local-name
Google sheets IMPORTXML Query get attribute with local-name

Time:01-07

This is a follow up question to this previous question: enter image description here

Note:

  • In the URL, it seems that there are 2 CPV_CODE tags. If you want to retrieve <CPV_CODE CODE="90524200"/>, how about the following formula?

      =IMPORTXML(A1,"//*[local-name()='CPV_ADDITIONAL']/*[local-name()='CPV_CODE']/@CODE")
    

    Or

      =IMPORTXML(A1,"//*[local-name()='CPV_ADDITIONAL']//@CODE")
    

Reference:

  •  Tags:  
  • Related