Code example for StringReader

0
	} 
 
	public static Metadata readMetadata(String xml) throws IOException { 
		MetadataXpp3Reader reader = new MetadataXpp3Reader(); 
		try { 
			return reader.read(new StringReader(xml)); 
		} catch (XmlPullParserException e) { 
			throw new IOException("Error parsing XML", e); 
		} 
	} 
}