Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Kommentar: Migrated to Confluence 5.3

It's possible to register a SerializationModifier to modify the xml serialization output for specific needs. To do this you need to write a modifier class that implements the com.jaxfront.core.dom.SerializationModifier interface.

 

Codeblock
themeEclipse
languagejava
linenumberstrue
public static class Mody implements SerializationModifier {

...

 
public void modifyStartTag(Type type, StringBuffer ser, int start) {

...


if (v.dom.getRootType().equals(type)) {

...


System.out.println(type.getName());

...


System.out.println(ser);

...


ser.insert(start, " xmlns=\"acme.com.mst\"");

...


}

...


}

...


public void modifySimpleTagValue(Type type, String value, StringBuffer serialization) {

...


}

...


public void modifyCompositeTagValue(Type type, String value, StringBuffer serialization, int start) {

...


}

...


}

...

 

Here is the code to register your implmentation.

Codeblock
themeEclipse
languagejava
linenumberstrue
dom.setSerializationModifier (modifier);