Skip to main content
Inspiring
July 25, 2018
Question

[ESTK] Get xmlElements not contains some attributes using Xpath expression

  • July 25, 2018
  • 1 reply
  • 681 views

Hi all,

I need to find xml element not contains class attribute using xpath expression.

I try the below xpath is not working. get an error.

Xpath:

          "//table[not(@class='informal')]"      or   "//table[not(@class)]"

Please give any helps!!

thanks,

John.

This topic has been closed for replies.

1 reply

Jongware
Community Expert
Community Expert
July 25, 2018

What error do you get? Is it important?

Where and how do you call this xpath?

Loic.Aigon
Legend
July 25, 2018

Remember that XPath implementation is only partial in ExtendScript so many functions will simply not be executed.

So you may need to collect table nodes with a simpler xpath like "//table" and loop through nodes to grab only the one you are looking for.