Serialization of CustomChangeWrapper

I think that implementing the Change interface is the recommended approach these days.  I have implemented a few custom tags by extending AbstractChange (easier) or simply implementing the Change interface.


As for the namespace issue, you can use http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd as a namespace for your tags if you do not care about validation.  You can also create create your own XSD if you want to validate your tags.

When I try to serialize CustomChangeWraper using XMLChangeLogSerializer I get wrong sql.
<span, old);

  •                   b = false;
  •             }
  •                   super.setCurrentChangeLogFileDOM(currentChangeLogFileDOM);
  •       }
  •       @Override
  •       public Element createNode(Change change) {
  •             Element node;
  •             if (change instanceof Prefixable) {
  •                   final Document old = super.createNode(change).getOwnerDocument();
  •                   final String ns = ((Prefixable)change).getPreffix();
  •                   Document d = new Document(){
  •                         @Override
  •                         public Element createElementNS(String namespaceURI, String qualifiedName)
  •                         throws DOMException
  •                         {
  •                               return old.createElementNS(ns, qualifiedName);
  •                         }
  •                   } ;
  •                   setCurrentChangeLogFileDOM(d);
  •                   node = super.createNode(change);
  •                   setCurrentChangeLogFileDOM(old);
  •             }else{
  •                   node = super.createNode(change);
  •             }
  •             return node;
  •       }
  • };
  • Please give me a hint how can I use my own Change without having to sell my soul for magic.