Example usage for com.liferay.portal.kernel.xml SAXReaderUtil getSAXReader

List of usage examples for com.liferay.portal.kernel.xml SAXReaderUtil getSAXReader

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.xml SAXReaderUtil getSAXReader.

Prototype

public static SAXReader getSAXReader() 

Source Link

Usage

From source file:com.liferay.alloy.tools.xmlbuilder.XMLBuilder.java

License:Open Source License

public XMLBuilder(String componentsJSON, String componentsXML, String componentExcluded) throws Exception {

    if (FileUtil.getFile() == null) {
        (new FileUtil()).setFile(new FileImpl());
    }//from  w w w.ja  v  a  2s. c  o  m

    if (SAXReaderUtil.getSAXReader() == null) {
        (new SAXReaderUtil()).setSAXReader(new SAXReaderImpl());
    }

    _componentJSON = componentsJSON;
    _componentXML = componentsXML;
    _componentExcluded = Arrays.asList(StringUtil.split(componentExcluded));

    _fileXML = new File(_componentXML);
    _fileJSON = new File(_componentJSON);

    _json = new JSONObject(FileUtil.read(_fileJSON));
    _classMapJSON = _json.getJSONObject("classmap");

    _create();
}