Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <tag att1="one" att2="two">
  2. content
  3. </tag>
  4.  
  5. <tag att2="two" att1="one">
  6. content
  7. </tag>
  8.  
  9. $ xmllint --c14n one.xml > 1.xml
  10. $ xmllint --c14n two.xml > 2.xml
  11. $ diff 1.xml 2.xml
  12.  
  13. xmllint --format one.xml > 1.xml
  14. xmllint --format two.xml > 2.xml
  15. diff 1.xml 2.xml
  16.  
  17. $ xmllint --exc-c14n one.xml > 1.xml
  18. $ xmllint --exc-c14n two.xml > 2.xml
  19. $ diff 1.xml 2.xml
  20.  
  21. $ xmllint | grep c14
  22. --c14n : save in W3C canonical format v1.0 (with comments)
  23. --c14n11 : save in W3C canonical format v1.1 (with comments)
  24. --exc-c14n : save in W3C exclusive canonical format (with comments)
  25.  
  26. $ rpm -qf /usr/bin/xmllint
  27. libxml2-2.7.6-14.el6.x86_64
  28. libxml2-2.7.6-14.el6.i686
  29.  
  30. $ cat /etc/system-release
  31. CentOS release 6.5 (Final)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement