@Override
	public int open(JoeTree tree, DocumentInfo docInfo, InputStream stream) {
		// Set the objects we are going to populate.
		this.docInfo = docInfo;
		this.tree = tree;
		
		// Do the Parsing
		int success = FAILURE;
		errorOccurred = false;
		
		try {
			super.process(stream, PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_ENCODING_TYPE));
			if (errorOccurred) {
				System.out.println("Error Occurred in OPMLFileFormat");
				success = FAILURE;
				return success;
			}
			success = SUCCESS;
		} catch (SAXException e) {
			System.out.println("SAXException: " + e.getMessage());
			success = FAILURE;
		} catch (IOException e) {
			System.out.println("IOException: " + e.getMessage());
			success = FAILURE;
		} catch (Exception e) {
			System.out.println("Exception: " + e.getMessage());
			e.printStackTrace();
			success = FAILURE;
		}
		
		// Cleanup
		super.reset();
		this.tree = null;
		this.docInfo = null;
		this.currentParent = null;
		
		return success;
	}