Problem:
--------
XMLStreamReader.next() never throws the SPACE event.
test.java
---------
import java.io.*;
import javax.xml.stream.*;
import javax.xml.stream.events.*;
public class test {
public static void main(String args[])throws Exception{
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLStreamReader r = factory.createXMLStreamReader(new java.io.FileReader("test.xml"));
while(r.hasNext()) {
System.out.println(r.next());
}
}
}
Expected Sequence:
-------------------
6
5
6
11
6
1
4
2
6
5
6
3
8
for test.xml
<?xml version='1.0' encoding='us-ascii'?>
<!-- DTD for a "product information". -->
<!DOCTYPE product PUBLIC "-//BEA Systems, Inc.//DTD for product//EN" "http://dev/products">
<mytext>
this is some text
</mytext>
<!--
<product
name="BEA Weblogic Server 6.0"
date="Date of Release 12/18/2000"
copyrite="2000-2001 BEA Systems, Inc." />
-->
<?process me?>
--------
XMLStreamReader.next() never throws the SPACE event.
test.java
---------
import java.io.*;
import javax.xml.stream.*;
import javax.xml.stream.events.*;
public class test {
public static void main(String args[])throws Exception{
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLStreamReader r = factory.createXMLStreamReader(new java.io.FileReader("test.xml"));
while(r.hasNext()) {
System.out.println(r.next());
}
}
}
Expected Sequence:
-------------------
6
5
6
11
6
1
4
2
6
5
6
3
8
for test.xml
<?xml version='1.0' encoding='us-ascii'?>
<!-- DTD for a "product information". -->
<!DOCTYPE product PUBLIC "-//BEA Systems, Inc.//DTD for product//EN" "http://dev/products">
<mytext>
this is some text
</mytext>
<!--
<product
name="BEA Weblogic Server 6.0"
date="Date of Release 12/18/2000"
copyrite="2000-2001 BEA Systems, Inc." />
-->
<?process me?>