Package cdc.util.data.tools
Class XmlNormalizer
- java.lang.Object
-
- cdc.util.data.tools.XmlNormalizer
-
public final class XmlNormalizer extends Object
Toy utility that can be used to "normalize" or modify an XML file.WARNING: This is not standard XML normalization, but it can be useful.
This can:- Pretty print file (indentation string can be specified).
- Sorting
- Sort all attributes.
- Move some attributes to first position.
- Sort all elements.
- Scrambling
- Scramble values of all attributes.
- Scramble values of some attributes.
- Scramble content of all elements.
- Scramble content of some elements.
- Removal
- Remove all empty attributes.
- Remove all pure elements.
- Remove all comments.
- Remove all elements that have a given name (before any local renaming).
- Remove all attributes that have a given name (before any local renaming).
- Renaming
- Rename attributes names.
- Rename elements names.
- Setting
- Set attributes values (of existing attributes).
- Set elements contents (of existing elements that have a text child or not children).
- Author:
- Damien Carbonne
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXmlNormalizer.MainArgs
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.logging.log4j.LoggerLOGGER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexecute(XmlNormalizer.MainArgs margs)static voidmain(String[] args)
-
-
-
Method Detail
-
execute
public static void execute(XmlNormalizer.MainArgs margs) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args)
-
-