xsi:noNamespaceSchemaLocation="../../defs/technical-component-definition.xsd">
<name>xml-marshall</name>
<description>Composant d'écriture XML</description>
- <release>5.0.0.3</release>
+ <release>5.0.0.4</release>
<url>http://xemelios.org/updatesV5/xml-marshall</url>
<type>COMPOSANT</type>
<destination>
<base>${xemelios.root}/lib</base>
</destination>
<release-notes>
+ <release v="5.0.0.4">
+ <note visibility="dev">Ajout d'une possiblité de tracer l'unmarshalling</note>
+ </release>
<release v="5.0.0.3">
<note visibility="public">Ajout d'un contructeur pour compatibilité avec ToTEM</note>
</release>
* @author Christophe MARCHAND
*/
public class XmlUnMarshaller extends DefaultHandler {
+ private static boolean DEBUG = false;
/**
* The mapping between tags and classes to instanciate.
*/
@Override
public void endElement(String uri, String localName, String qName) throws org.xml.sax.SAXException {
+ if(DEBUG) {
+ System.out.println("endElement("+uri+","+localName+","+qName+")");
+ }
XmlMarshallable m = stack.pop();
if (stack.empty()) {
marshallable = m;
*/
@Override
public void startElement(String uri, String localName, String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException {
+ if(DEBUG) {
+ System.out.println("startElement("+uri+","+localName+","+qName+")");
+ }
QName tag = getQName(uri, localName, qName);
Class clazz = (Class) mapping.get(tag);
if (clazz == null) {
}
}
public HashMap<QName, Class> getMapping() { return mapping; }
+ /**
+ * Permet de forcer le un-marshaller à logger
+ * @param debug
+ */
+ public static void setDebug(boolean debug) {
+ XmlUnMarshaller.DEBUG = debug;
+ }
}