cvs commit: spice/sandbox/metaclass/src/java/org/realityforge/metaclass/io MetaClassIOXml.java

Peter Donald <[email protected]>
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
donaldp     03/10/31 16:04:53

  Modified:    sandbox/metaclass/src/java/org/realityforge/metaclass/io
                        MetaClassIOXml.java
  Log:
  Build ClassDescriptor from document aswell
  
  Revision  Changes    Path
  1.8       +5 -7      spice/sandbox/metaclass/src/java/org/realityforge/metaclass/io/MetaClassIOXml.java
  
  Index: MetaClassIOXml.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/metaclass/src/java/org/realityforge/metaclass/io/MetaClassIOXml.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MetaClassIOXml.java	29 Oct 2003 10:34:13 -0000	1.7
  +++ MetaClassIOXml.java	1 Nov 2003 00:04:53 -0000	1.8
  @@ -11,24 +11,23 @@
   import java.io.InputStream;
   import java.io.OutputStream;
   import java.util.Properties;
  +import javax.xml.parsers.DocumentBuilder;
  +import javax.xml.parsers.DocumentBuilderFactory;
   import javax.xml.transform.OutputKeys;
   import javax.xml.transform.TransformerFactory;
   import javax.xml.transform.sax.SAXTransformerFactory;
   import javax.xml.transform.sax.TransformerHandler;
   import javax.xml.transform.stream.StreamResult;
  -import javax.xml.parsers.DocumentBuilderFactory;
  -import javax.xml.parsers.DocumentBuilder;
   import org.realityforge.metaclass.model.ClassDescriptor;
  -import org.xml.sax.SAXException;
   import org.w3c.dom.Document;
  -import org.w3c.dom.Element;
  +import org.xml.sax.SAXException;
   
   /**
    * This is a utility class that writes out the ClassDescriptor
    * to a stream using the xml format outlined in documentation.
    *
    * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2003/10/29 10:34:13 $
  + * @version $Revision: 1.8 $ $Date: 2003/11/01 00:04:53 $
    */
   public class MetaClassIOXml
       implements MetaClassIO
  @@ -120,8 +119,7 @@
               final DocumentBuilder builder = factory.newDocumentBuilder();
               final Document document = builder.parse( input );
               final DOMMetaClassDeserializer deserializer = new DOMMetaClassDeserializer();
  -            final Element element = document.getDocumentElement();
  -            return deserializer.buildClassDescriptor( element );
  +            return deserializer.buildClassDescriptor( document );
           }
           catch( final Exception e )
           {
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.