Examples of XMLDecImpl


Examples of org.itsnat.impl.core.domimpl.XMLDecImpl

    {
        StringWriter out = new StringWriter();
        serializeDocument(doc,out);
        String markup = out.toString();

        XMLDecImpl xmlDec = ((DocumentImpl)doc).getXMLDec();
        if (xmlDec != null)
        {
            // A�adimos la declaraci�n XML puesta en el template original
            StringBuilder buffer = new StringBuilder( "<?xml" );
            String version = xmlDec.getVersion();
            if (version != null) buffer.append( " version=\"" + version + "\"");
            // Podr�amos poner "1.0" en caso null pero vamos a ser respetuosos con el original
            String encoding = xmlDec.getEncoding();
            if (encoding != null)
                buffer.append(" encoding=\"" + encoding + "\"");
            String standalone = xmlDec.getStandalone();
            if (standalone != null)
                buffer.append( " standalone=\"" + standalone + "\"");
            buffer.append( "?>\n" );
            buffer.append(markup);
View Full Code Here

Examples of org.itsnat.impl.core.domimpl.XMLDecImpl

        DocumentType docType = doc.getDoctype();
        if (docType != null)
            cloneDocType = domImplClone.createDocumentType(docType.getNodeName(),docType.getPublicId(),docType.getSystemId());
        Element docElem = doc.getDocumentElement();
        DocumentImpl docClone = (DocumentImpl)domImplClone.createDocument(docElem.getNamespaceURI(),docElem.getTagName(),cloneDocType);
        XMLDecImpl xmlDec = ((DocumentImpl)doc).getXMLDec();
        if (xmlDec != null)
            docClone.setXMLDec(xmlDec.getVersion(),xmlDec.getEncoding(),xmlDec.getStandalone());
        return docClone;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.