if (_debug) { System.out.println("Marshalling " + object.getClass().getName());
if (enableDebug) { System.out.print("- Marshaller called using "); System.out.println("*static* marshal(Object, Writer)");
    public void marshal(Object object)        throws MarshalException, ValidationException    {        if (object == null)            throw new MarshalException("object must not be null");        if (_debug) {            System.out.println("Marshalling " + object.getClass().getName());        }        if (object instanceof AnyNode) {           try{              AnyNode2SAX.fireEvents((AnyNode)object, _handler);           } catch(SAXException e) {                throw new MarshalException(e);           }        }        else {             validate(object);             if (_asDocument) {                try {                    _handler.startDocument();                    //-- handle processing instructions                    for (int i = 0; i < _processingInstructions.size(); i++) {                        ProcessingInstruction pi = (ProcessingInstruction)                            _processingInstructions.get(i);                        _handler.processingInstruction(pi.getTarget(),                            pi.getData());                    }                    marshal(object, null, _handler);                    _handler.endDocument();                } catch (SAXException sx) {                    throw new MarshalException(sx);                }             }             else {                marshal(object, null, _handler);             }        }    } //-- marshal