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

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

  Modified:    sandbox/metaclass/src/java/org/realityforge/metaclass/io
                        DOMMetaClassDeserializer.java
  Log:
  Make sure expectAttribute works as expected
  
  Revision  Changes    Path
  1.6       +5 -3      spice/sandbox/metaclass/src/java/org/realityforge/metaclass/io/DOMMetaClassDeserializer.java
  
  Index: DOMMetaClassDeserializer.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/metaclass/src/java/org/realityforge/metaclass/io/DOMMetaClassDeserializer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DOMMetaClassDeserializer.java	31 Oct 2003 23:42:53 -0000	1.5
  +++ DOMMetaClassDeserializer.java	31 Oct 2003 23:48:14 -0000	1.6
  @@ -17,11 +17,12 @@
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
  +import org.w3c.dom.Attr;
   
   /**
    *
    * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2003/10/31 23:42:53 $
  + * @version $Revision: 1.6 $ $Date: 2003/10/31 23:48:14 $
    */
   public class DOMMetaClassDeserializer
   {
  @@ -299,11 +300,12 @@
           }
       }
   
  +
       String expectAttribute( final Element element,
                               final String expected )
           throws Exception
       {
  -        final String actual = element.getAttribute( expected );
  +        final Attr actual = element.getAttributeNode( expected );
           if( null == actual )
           {
               final String message =
  @@ -312,7 +314,7 @@
                   " @ " + getPathDescription( element ) + ".";
               throw new Exception( message );
           }
  -        return actual;
  +        return actual.getValue();
       }
   
       /**
  
  
  


-------------------------------------------------------
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.