Package org.encog.parse.tags.read

Examples of org.encog.parse.tags.read.ReadXML


  final static String XML2 = "<a testThis='text1'>";
 
  public void testRead() throws Throwable
  {
    ByteArrayInputStream bos = new ByteArrayInputStream(TestXMLRead.XML.getBytes());
    ReadXML read = new ReadXML(bos);
    Assert.assertEquals(0,read.read());
    Assert.assertTrue(read.is("doc", true));
    Assert.assertEquals(0,read.read());
    Assert.assertTrue(read.is("a", true));
    Assert.assertEquals('a',read.read());
    Assert.assertEquals(0,read.read());
    Assert.assertTrue(read.is("a", false));
    bos.close();
  }
View Full Code Here


  }
 
  public void testCAPS() throws Throwable
  {
    ByteArrayInputStream bos = new ByteArrayInputStream(TestXMLRead.XML2.getBytes());
    ReadXML read = new ReadXML(bos);
    Assert.assertEquals(0,read.read());
    Assert.assertTrue(read.is("a", true));
    Assert.assertEquals("text1", read.getTag().getAttributeValue("testThis"));
    bos.close();
  }
View Full Code Here

        this.readZipFile = null;
        throw new BufferedDataError("Could not find worksheet.");
      }

      final InputStream is = this.readZipFile.getInputStream(this.entry);
      this.xmlIn = new ReadXML(is);

    } catch (final ZipException e) {
      throw new BufferedDataError("Not a valid Excel file.");
    } catch (final IOException e) {
      throw new BufferedDataError(e);
View Full Code Here

        this.readZipFile = null;
        throw new BufferedDataError("Could not find worksheet.");
      }

      final InputStream is = this.readZipFile.getInputStream(this.entry);
      this.xmlIn = new ReadXML(is);

    } catch (final ZipException e) {
      throw new BufferedDataError("Not a valid Excel file.");
    } catch (final IOException e) {
      throw new BufferedDataError(e);
View Full Code Here

TOP

Related Classes of org.encog.parse.tags.read.ReadXML

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.