A library to produce canonical XML in JAVA 5?
-
16-12-2019 - |
Question
I'm using org.apache.xml.security.c14n.Canonicalizer
which was recommended to me here: Sort xml attributes for pretty print using javax.xml.transform.Transformer. I will need it to run in Java 5 though.. it doesn't seem to work.
Are there any options?
Solution
XOM has a Canonicalizer
which will do this.
In addition to being a very good general-purpose XML DOM library, it's a much more lightweight solution to canonicalization than your XSLT-based solution.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow