Hi, What could be going wrong with this file? I don't see anything.
Notice that it is the exception is caused by XMLStreamReader.next(). The javadoc of this method is: > Get next parsing event - a processor may return all contiguous character > data in a single chunk, or it may split it into several chunks. If the > property javax.xml.stream.isCoalescing is set to true element content must > be coalesced and only one CHARACTERS event must be returned for contiguous > element content or CDATA Sections. By default entity references must be > expanded and reported transparently to the application. An exception will be > thrown if an entity reference cannot be expanded. If element content is > empty (i.e. content is "") then no CHARACTERS event will be reported. > > Given the following XML: > content > textHello]]>other content > The behavior of calling next() when being on foo will be: > 1- the comment (COMMENT) > 2- then the characters section (CHARACTERS) > 3- then the CDATA section (another CHARACTERS) > 4- then the next characters section (another CHARACTERS) > 5- then the END_ELEMENT > > *NOTE:* empty element (such as ) will be reported with two separate > events: START_ELEMENT, END_ELEMENT - This preserves parsing equivalency of > empty element to . This method will throw an > IllegalStateException if it is called after hasNext() returns false. > By debugging, i found that javax.xml.stream.isCoalescing is set to true. I don't understand what does this does and what should i do if it's true, as described by the javadoc. Can you help me understand this? Maybe this can help solve the problem. you see, this method throws a XMLStreamException: if there is an error processing the underlying XML source. Wessam On 10/3/07, Thomas Dudziak wrote: > > On 10/2/07, Wessam Abd Rabo wrote: > > > I get the following exception: > > > > org.apache.ddlutils.io.DdlUtilsXMLException: > > javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,74] > > Message: db.apache.org > > at org.apache.ddlutils.io.DatabaseIO.read(DatabaseIO.java:278) > > at org.apache.ddlutils.io.DatabaseIO.read(DatabaseIO.java:207) > > at org.apache.ddlutils.io.DatabaseIO.read(DatabaseIO.java:171) > > > > Caused by: javax.xml.stream.XMLStreamException: ParseError at > > [row,col]:[2,74] > > Message: db.apache.org > > at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560) > > at org.apache.ddlutils.io.DatabaseIO.read(DatabaseIO.java:262) > > ... 26 more > > > > what could be going wrong? Could it be the XML file that am reading? > > That seems to be the case. Check your XML file, line 2, character 74 > (as indicated by the exception message). > > Tom >