Package org.exoplatform.commons.xml

Examples of org.exoplatform.commons.xml.XMLDeclarationParser


        ModulePrefs prefs = spec.getModulePrefs();

        // detect the encoding declared in the XML source
        // note that we do not need to detect the encoding of gadgetXML because
        // it is a String and not a stream
        String encoding = new XMLDeclarationParser(gadgetXML).parse().get(XMLDeclarationParser.ENCODING);
        if (encoding == null || !Charset.isSupported(encoding)) {
            throw new UnsupportedEncodingException(encoding);
        }
        // get the bytes in the declared encoding
        byte[] bytes = gadgetXML.getBytes(encoding);
View Full Code Here

TOP

Related Classes of org.exoplatform.commons.xml.XMLDeclarationParser

Copyright © 2018 www.massapicom. 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.