KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > xstream > io > xml > XppDomDriver


1 package com.thoughtworks.xstream.io.xml;
2
3 import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
4 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
5 import com.thoughtworks.xstream.io.StreamException;
6 import com.thoughtworks.xstream.io.xml.xppdom.Xpp3DomBuilder;
7
8 import java.io.Reader JavaDoc;
9
10 public class XppDomDriver implements HierarchicalStreamDriver {
11     public HierarchicalStreamReader createReader(Reader xml) {
12         try {
13             return new XppDomReader(Xpp3DomBuilder.build(xml));
14         } catch (Exception JavaDoc e) {
15             throw new StreamException(e);
16         }
17     }
18 }
19
Popular Tags