filippo
filippo

Reputation: 5793

A library to produce canonical XML in JAVA 5?

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?

Upvotes: 0

Views: 1060

Answers (1)

skaffman
skaffman

Reputation: 403531

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.

Upvotes: 2

Related Questions