private static XMLElement loadXML(final String pAbsoluteFilePath) { final XMLElement mLocalXML = new XMLElement(new Hashtable(), false, false); try { mLocalXML.parseFromReader( new InputStreamReader(werkzeug.Util.getInputStream(pAbsoluteFilePath))); } catch (IOException ex) { System.err.println("### ERROR / couldn t read XML file." + ex); } return mLocalXML; }
public YafaraySceneWriter(final String pXMLFileName, final Bin pBin) { mCurrentXMLFileName = Resource.getPath("") + "/" + pXMLFileName + "-" + werkzeug.Util.now() + ".xml"; mXML = loadXML(DEFAULT_SCENE_XML); mTranslators = new Vector<YafarayDrawableTranslator>(); mTranslators.add(new YafarayMeshTranslator()); mTranslators.add(new YafarayModelTranslator()); mTranslators.add(new YafarayCameraTranslator()); parse(pBin); saveXML(mCurrentXMLFileName, mXML); launchRenderer(); }