We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The XMLFlattener only allows access to Element nodes and not Attribute nodes.
e.g. Element nodes successfully work with an XPATH of /element <element>value</element>
<element>value</element>
Attribute nodes do no work with an XPATH of /attribute[@name='key']/@value <attribute name='key' value='value' />
<attribute name='key' value='value' />
I've tried a fix for this by modifying isXmlLeafNode() to check for either ELEMENT_NODE or ATTRIBUTE_NODE which resolved the problem I had.
return node != null && (node.getNodeType() == Node.ELEMENT_NODE || node.getNodeType() == Node.ATTRIBUTE_NODE) && node.getChildNodes().getLength() == 1 && node.getFirstChild().getNodeType() == Node.TEXT_NODE;
The text was updated successfully, but these errors were encountered:
Enabling attributes with XPath #25
53f9241
Released in 1.20 now. Open issue again if not working.
Sorry, something went wrong.
No branches or pull requests
The XMLFlattener only allows access to Element nodes and not Attribute nodes.
e.g.
Element nodes successfully work with an XPATH of /element
<element>value</element>
Attribute nodes do no work with an XPATH of /attribute[@name='key']/@value
<attribute name='key' value='value' />
I've tried a fix for this by modifying isXmlLeafNode() to check for either ELEMENT_NODE or ATTRIBUTE_NODE which resolved the problem I had.
return node != null && (node.getNodeType() == Node.ELEMENT_NODE || node.getNodeType() == Node.ATTRIBUTE_NODE) && node.getChildNodes().getLength() == 1 && node.getFirstChild().getNodeType() == Node.TEXT_NODE;
The text was updated successfully, but these errors were encountered: