I have an div elemet:
div
This is some text This is a title Some other content <
What xpath expression should I use to only get the div content without his child elements h1 and div
h1
This XPath expression:
/div/node()[not(self::h1|self::div)]
It selects every div root element's children except those h1 or div elements.