Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

canonicalizing vs normalizing  RSS feed

 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between canonicalizing and normailizing xml?
 
Junaid Bhatra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normalizing an XML document means removing whitespace characters (spaces, tabs, linefeeds, etc) from the XML document so that you can directly work with the element & attribute values. It's useful when you wish to compare 2 XML documents.
Canonicalizing an XML document is a much stricter process, which involves among other things, replacing character & parsed entity references with their values, and replacing CDATA sections with their character content.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!