I have an Xml document of which parts need to be Hashed for signature.
To get xml subtree I use Namespace aware Document
xml document as image – because SO treats content as SPAM
How do I extract subtree “/EDoc/Signature/Object/QualifyingProperties/SignedProperties”
so it contains inherited namespaces exactly like this?
subtree with correct Namespace information
Tried doing it with XPath:
XPathExpression expr = xpath
.compile("/EDoc/Signature/Object/QualifyingProperties/SignedProperties");
Node spNode = (Node) expr.evaluate(outdocp, XPathConstants.NODE);
saving spNode
to string shows it is missing needed xmlns –
subtree with Incorrect/missing inherited namespaces
happy yuan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.