xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric...@apache.org
Subject cvs commit: xml-xmlbeans/v2/test/src/erictest EricTest.java
Date Wed, 03 Mar 2004 23:46:50 GMT
ericvas     2004/03/03 15:46:50

  Modified:    v2/src/newstore2/org/apache/xmlbeans/impl/newstore2
                        Cursor.java
               v2/test/src/erictest EricTest.java
  Log:
  Impl xmlText on XmlCursor
  
  Revision  Changes    Path
  1.4       +9 -8      xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cursor.java
  
  Index: Cursor.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cursor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Cursor.java	3 Mar 2004 22:56:38 -0000	1.3
  +++ Cursor.java	3 Mar 2004 23:46:50 -0000	1.4
  @@ -43,8 +43,7 @@
   import org.xml.sax.ext.LexicalHandler;
   import org.xml.sax.SAXException;
   
  -import org.apache.xmlbeans.impl.newstore2.Cur;
  -import org.apache.xmlbeans.impl.newstore2.Locale;
  +import org.apache.xmlbeans.impl.newstore2.Saver.TextSaver;
   
   public final class Cursor implements XmlCursor
   {
  @@ -287,7 +286,14 @@
       
       public String _xmlText ( )
       {
  -        throw new RuntimeException( "Not implemented" );
  +        return _xmlText( null );
  +    }
  +    
  +    public String _xmlText ( XmlOptions options )
  +    {
  +        assert isValid();
  +        
  +        return new TextSaver( _cur, options, null ).saveToString();
       }
       
       public InputStream _newInputStream ( )
  @@ -326,11 +332,6 @@
       }
       
       public XMLInputStream _newXMLInputStream ( XmlOptions options )
  -    {
  -        throw new RuntimeException( "Not implemented" );
  -    }
  -    
  -    public String _xmlText ( XmlOptions options )
       {
           throw new RuntimeException( "Not implemented" );
       }
  
  
  
  1.28      +7 -1      xml-xmlbeans/v2/test/src/erictest/EricTest.java
  
  Index: EricTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/test/src/erictest/EricTest.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- EricTest.java	3 Mar 2004 22:56:39 -0000	1.27
  +++ EricTest.java	3 Mar 2004 23:46:50 -0000	1.28
  @@ -106,7 +106,13 @@
   {
       public static void main ( String[] args ) throws Exception
       {
  -        XmlCursor c = Public2.newStore();
  +        Document doc = Public2.parse( "<a/>" );
  +
  +        XmlCursor c = Public2.getCursor( doc );
  +        
  +//        XmlCursor c = Public2.newStore();
  +
  +        System.out.println( c.xmlText() );
   
           c.toNextToken();
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org


Mime
View raw message