1 package com.thoughtworks.xstream.xml.dom4j;
2
3 import com.thoughtworks.xstream.xml.CannotParseXMLException;
4 import com.thoughtworks.xstream.xml.XMLReader;
5 import com.thoughtworks.xstream.xml.XMLReaderDriver;
6 import org.dom4j.DocumentException;
7 import org.dom4j.DocumentHelper;
8
9 public class Dom4JXMLReaderDriver implements XMLReaderDriver {
10 public XMLReader createReader(String xml) {
11 try {
12 return new Dom4JXMLReader(DocumentHelper.parseText(xml));
13 } catch (DocumentException e) {
14 throw new CannotParseXMLException(e);
15 }
16 }
17
18 }
This page was automatically generated by Maven