You can use the following XPath:
"./article/article-id[@pub-id-type='external']"
The [@pub-id-type='external']
is an attribute filter.
If you have multiple possible elements, you could add [last()]
to get the last of them.
For more XPath info, check out this page.