2021年3月4日星期四

Using XPath to check the number of characters in an attribute of an element

I'm looking for an XPath expression that will check the number of characters in an attribute of an element.

I want an expression that will check to make sure that the attribute 'disassyCodeVariant' (shown in the code below) is ONLY 3 characters in length - can it be done and if so how? The code sample is:

`dmCode modelIdentCode="PRODUCT" disassyCode="00" disassyCodeVariant="A" infoCode="022"`

Help appreciated.

Cheers https://stackoverflow.com/questions/66485299/using-xpath-to-check-the-number-of-characters-in-an-attribute-of-an-element March 05, 2021 at 09:07AM

没有评论:

发表评论