Pergunta

I need set query to the dom4j document like Node fromTag = document.selectSingleNode("//*:from"); without prefix in select query. How can I do that?

Foi útil?

Solução

DOM4J supports XPath 1.0 only, but you can use this expression instead:

document.selectSingleNode("//*[local-name()='from']");
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top