Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Kommentar: Corrected links that should have been relative instead of absolute.

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.
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) {
}
}

How to register:
API: dom.setSerializationModifier (modifier);