Re: parse a part of xml
Hi Andreas, thanks a lot for your help - i will try out your code today! Also thanks the all the other for the fast replys. Original-Nachricht > Datum: Wed, 17 Dec 2008 11:40:00 +0100 > Von: "BEEKER, ANDREAS (Allianz Deutschland, externer Mitarbeiter)" > > An: "user@xmlbeans.apache.org" > Betreff: Re: parse a part of xml > Hi Eugen, > > we use xml beans within streaming xml processing and had a similar > problem. > The helper class simply throws away the elements until it reads the given > tag. > When its on the element, the xml will be copied into a stringbuffer which > can be then parsed by your xml bean. > For stream processing we are using woodstox. > (I hope there are not to many errors into following code as I only adapted > it > straight from our sources without testing ...) > > Best wishes, > Andreas. > > > > XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); > XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance(); > StringWriter sw = new StringWriter(); > > XmlOptions xo = new XmlOptions(); > xo.setLoadStripWhitespace(); > xo.setValidateTreatLaxAsSkip(); > xo.setSaveOuter(); > ArrayList validationErrors = new ArrayList(); > xo.setErrorListener(validationErrors); > > XMLEventReader xmlReader = xmlInputFactory.createXMLEventReader( inputstream>); > XMLEventWriter xmlWriter = xmlOutputFactory.createXMLEventWriter(sw); > > > // skip pragma/prefix > StaxHelper.readUntilElement(xmlReader, xmlWriter, "ProjectDataSet"); > > // read element > StaxHelper.readElement(xmlReader, xmlWriter, sw, "ProjectDataSet"); > > ParentOfProjectDataSetType popdst = > ParentOfProjectDataSetType.Factory.parse(sw.toString(), xo); > ProjectDataSetType pdst = popdst.getProjectDataSet(); > > > > > > public class StaxHelper { > public static XMLEvent readUntilElement(XMLEventReader xmlReader, > XMLEventWriter xmlWriter, String name) > throws XMLStreamException, NpsAppError { > XMLEvent event = null; > > for (boolean isFirstElement = true; xmlReader.hasNext(); > isFirstElement = false) { > event = xmlReader.peek(); > if (event.isStartElement()) { > if (!isFirstElement && > name.equals(((StartElement)event).getName().getLocalPart())) { > if (xmlWriter != null) > xmlWriter.flush(); > return event; > } > } > event = xmlReader.nextEvent(); > if (xmlWriter != null) xmlWriter.add(event); > if (event.isEndElement() && > name.equals(((EndElement)event).getName().getLocalPart())) { > if (xmlWriter != null) xmlWriter.flush(); > return event; > } > } > > // throws exception after last element > throw new NpsAppError( > NpsErrorConst.ERROR_ELEMENT_NOT_FOUND, > NpsErrorConst.XML_SUBSYSTEM, > name); > } > > public static void readElement(XMLEventReader xmlReader, > XMLEventWriter xmlWriter, StringWriter sw, String name) > throws XMLStreamException, NpsAppError { > StringBuffer sb = sw.getBuffer(); > > XMLEvent evt = xmlReader.peek(); > boolean isAtElement = (evt.isStartElement() && > name.equals(((StartElement)evt).getName().getLocalPart())); > > if (!isAtElement) { > readUntilElement(xmlReader, xmlWriter, name); /* > search start */ > } > xmlWriter.flush(); > sb.setLength(0); > > readUntilElement(xmlReader, xmlWriter, name); /* search > end */ > xmlWriter.flush(); > > int startTagIdx = sb.indexOf("<"); > if (startTagIdx > 0) sb.delete(0, startTagIdx); > } > } > > > > > -Ursprüngliche Nachricht- > Von: Eugen Okon [mailto:eugeno...@gmx.de] > Gesendet: Dienstag, 16. Dezember 2008 16:21 > An: user@xmlbeans.apache.org > Betreff: Re: parse a part of xml > > Hi Andy, > > my interactions with the web service are limited to very basic operations, > so i do not use any special framework ecxept apache commons. I get the > response as an InputStream.
Re: parse a part of xml
Hi Eugen, we use xml beans within streaming xml processing and had a similar problem. The helper class simply throws away the elements until it reads the given tag. When its on the element, the xml will be copied into a stringbuffer which can be then parsed by your xml bean. For stream processing we are using woodstox. (I hope there are not to many errors into following code as I only adapted it straight from our sources without testing ...) Best wishes, Andreas. XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance(); StringWriter sw = new StringWriter(); XmlOptions xo = new XmlOptions(); xo.setLoadStripWhitespace(); xo.setValidateTreatLaxAsSkip(); xo.setSaveOuter(); ArrayList validationErrors = new ArrayList(); xo.setErrorListener(validationErrors); XMLEventReader xmlReader = xmlInputFactory.createXMLEventReader(); XMLEventWriter xmlWriter = xmlOutputFactory.createXMLEventWriter(sw); // skip pragma/prefix StaxHelper.readUntilElement(xmlReader, xmlWriter, "ProjectDataSet"); // read element StaxHelper.readElement(xmlReader, xmlWriter, sw, "ProjectDataSet"); ParentOfProjectDataSetType popdst = ParentOfProjectDataSetType.Factory.parse(sw.toString(), xo); ProjectDataSetType pdst = popdst.getProjectDataSet(); public class StaxHelper { public static XMLEvent readUntilElement(XMLEventReader xmlReader, XMLEventWriter xmlWriter, String name) throws XMLStreamException, NpsAppError { XMLEvent event = null; for (boolean isFirstElement = true; xmlReader.hasNext(); isFirstElement = false) { event = xmlReader.peek(); if (event.isStartElement()) { if (!isFirstElement && name.equals(((StartElement)event).getName().getLocalPart())) { if (xmlWriter != null) xmlWriter.flush(); return event; } } event = xmlReader.nextEvent(); if (xmlWriter != null) xmlWriter.add(event); if (event.isEndElement() && name.equals(((EndElement)event).getName().getLocalPart())) { if (xmlWriter != null) xmlWriter.flush(); return event; } } // throws exception after last element throw new NpsAppError( NpsErrorConst.ERROR_ELEMENT_NOT_FOUND, NpsErrorConst.XML_SUBSYSTEM, name); } public static void readElement(XMLEventReader xmlReader, XMLEventWriter xmlWriter, StringWriter sw, String name) throws XMLStreamException, NpsAppError { StringBuffer sb = sw.getBuffer(); XMLEvent evt = xmlReader.peek(); boolean isAtElement = (evt.isStartElement() && name.equals(((StartElement)evt).getName().getLocalPart())); if (!isAtElement) { readUntilElement(xmlReader, xmlWriter, name); /* search start */ } xmlWriter.flush(); sb.setLength(0); readUntilElement(xmlReader, xmlWriter, name); /* search end */ xmlWriter.flush(); int startTagIdx = sb.indexOf("<"); if (startTagIdx > 0) sb.delete(0, startTagIdx); } } -Ursprüngliche Nachricht- Von: Eugen Okon [mailto:eugeno...@gmx.de] Gesendet: Dienstag, 16. Dezember 2008 16:21 An: user@xmlbeans.apache.org Betreff: Re: parse a part of xml Hi Andy, my interactions with the web service are limited to very basic operations, so i do not use any special framework ecxept apache commons. I get the response as an InputStream. Thats the reason i am search for a way to skip a part of the response. Even in the case i could get just the body of the soap message there would be some "pre-"tags generated by the Microsoft Project Web Service which i do not want to model as java objects. i have seen that the parse method has an additional parameter : XMLOptions, but i can't find out whether its helpfull for my aim or not. There should be a possibility to tell the parse which node shoult be treated as root - or not? I have search for similar problems in the mailinglist but i can't find anything. I think there should be more users which need this functionality or is my approach just wrong :)? Original-Nachricht > Datum: Tue, 16 Dec 2008 08:59:41 -0600 > Von: Andy Putnins > An: user@xmlbeans.apache.org > Betreff: Re: parse a part of xml > How are you handing the SOAP protocol messages? I have done this in the > past by utilizing AXIS >
Re: parse a part of xml
The simplest thing you could do is to parse the InputStream with an XML parser of your choice. Then you can use XPath to select the node that you want. You can then initialize your XMLBeans object from that node. From: Eugen Okon To: user@xmlbeans.apache.org Sent: Tuesday, December 16, 2008 10:20:48 AM Subject: Re: parse a part of xml Hi Andy, my interactions with the web service are limited to very basic operations, so i do not use any special framework ecxept apache commons. I get the response as an InputStream. Thats the reason i am search for a way to skip a part of the response. Even in the case i could get just the body of the soap message there would be some "pre-"tags generated by the Microsoft Project Web Service which i do not want to model as java objects. i have seen that the parse method has an additional parameter : XMLOptions, but i can't find out whether its helpfull for my aim or not. There should be a possibility to tell the parse which node shoult be treated as root - or not? I have search for similar problems in the mailinglist but i can't find anything. I think there should be more users which need this functionality or is my approach just wrong :)?
Re: parse a part of xml
Then I think you'll either have to model the enclosing tags by compiling the SOAP protocol schema and using the generated XMLBeans types, or else use your favorite XML parser to extract your modeled document from the enclosing xml tags without modeling them in XMLBeans. - Andy On Tue, 16 Dec 2008 16:20:48 +0100 "Eugen Okon" wrote: > Hi Andy, > > my interactions with the web service are limited to very basic operations, > so i do not use any special framework ecxept apache commons. I get the response as an InputStre am. Thats the reason i am search for a way to skip a part of the response. Even in t he case i could get just the body of the soap message there would be some "pre-"tags generated by the Microsoft Project Web Service which i do not want to model as java objects. i have seen that the parse method has an additional parameter : XMLOptions , but i can't find out whether its helpfull for my aim or not. There should be a po ssibility to tell the parse which node shoult be treated as root - or not? I have se arch for similar problems in the mailinglist but i can't find anything. I think ther e should be more users which need this functionality or is my approach just wrong :) ? > Original-Nachricht > > Datum: Tue, 16 Dec 2008 08:59:41 -0600 > > Von: Andy Putnins > > An: user@xmlbeans.apache.org > > Betreff: Re: parse a part of xml > > > How are you handing the SOAP protocol messages? I have done this in the > > past by utilizing AXIS > > running in a Tomcat container to decode the SOAP messages. AXIS includes a > > wsdl2java utility > > to generate server-side stubs and implementation classes. Then you can use > > XMLBeans to process the > > contents of the SOAP messages. > > > >- Andy > > > > On Tue, 16 Dec 2008 08:55:15 +0100 "Eugen Okon" wrote: > > > Hi Jacob, > > > thanks a lot for your answer! > > > There is no problem to get the values of the projectdataset, in the > > case that i copy/p > > aste the > > > > > >Information I need > > > > > > part to a new file and use it. The exception is caused (in my opinion) > > because the roo > > t element of the doc i am trying to parse is and not > > > >. What i am searching for is a possibility to tell the parser to > > skip all tags till > > . The Exception i get is: > > > > > > error: The document is not a > > projectdata...@http://schemas.microsoft.com/office/projec > > t/server/webservices/ProjectDataSet/: document element mismatch got > > envel...@http:// > > schemas.xmlsoap.org/soap/envelope/ > > > at > > org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:458) > > > at > > org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:363) > > > > > > with best regards > > > Eugen > > > Original-Nachricht > > > > Datum: Mon, 15 Dec 2008 09:15:22 -0800 > > > > Von: "Jacob Danner" > > > > An: user@xmlbeans.apache.org > > > > Betreff: Re: parse a part of xml > > > > > > > Hi Eugen, > > > > Are you having troubles getting the value of the projectdataset > > > > element or are you just getting an exception when you are trying to > > > > parse it? > > > > Is there a projectDatasetType Class available? Have you tried that? > > > > What is the exception you are seeing? > > > > -jacobd > > > > > > > > On Mon, Dec 15, 2008 at 1:41 AM, Eugen Okon wrote: > > > > > Hello, > > > > > i am new to xmlbeans, so maybe my question is a kind of "basics" > > for the > > > > framework. I am writing an application which communicates with Ms > > Project > > > > PSI Web Services. The application gets a SOAP response from Ms > > Project. The > > > > structure of this response is described below: > > > > > > > > > > > > > > > â¦.. > > > > > > > > > > > > > > >⦠> > > > > > > > > >Information I need > > > > > > > > > >⦠>
Re: parse a part of xml
Hi Andy, my interactions with the web service are limited to very basic operations, so i do not use any special framework ecxept apache commons. I get the response as an InputStream. Thats the reason i am search for a way to skip a part of the response. Even in the case i could get just the body of the soap message there would be some "pre-"tags generated by the Microsoft Project Web Service which i do not want to model as java objects. i have seen that the parse method has an additional parameter : XMLOptions, but i can't find out whether its helpfull for my aim or not. There should be a possibility to tell the parse which node shoult be treated as root - or not? I have search for similar problems in the mailinglist but i can't find anything. I think there should be more users which need this functionality or is my approach just wrong :)? Original-Nachricht > Datum: Tue, 16 Dec 2008 08:59:41 -0600 > Von: Andy Putnins > An: user@xmlbeans.apache.org > Betreff: Re: parse a part of xml > How are you handing the SOAP protocol messages? I have done this in the > past by utilizing AXIS > running in a Tomcat container to decode the SOAP messages. AXIS includes a > wsdl2java utility > to generate server-side stubs and implementation classes. Then you can use > XMLBeans to process the > contents of the SOAP messages. > > - Andy > > On Tue, 16 Dec 2008 08:55:15 +0100 "Eugen Okon" wrote: > > Hi Jacob, > > thanks a lot for your answer! > > There is no problem to get the values of the projectdataset, in the > case that i copy/p > aste the > > > >Information I need > > > > part to a new file and use it. The exception is caused (in my opinion) > because the roo > t element of the doc i am trying to parse is and not > >. What i am searching for is a possibility to tell the parser to > skip all tags till > . The Exception i get is: > > > > error: The document is not a > projectdata...@http://schemas.microsoft.com/office/projec > t/server/webservices/ProjectDataSet/: document element mismatch got > envel...@http:// > schemas.xmlsoap.org/soap/envelope/ > >at > org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:458) > >at > org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:363) > > > > with best regards > > Eugen > > Original-Nachricht > > > Datum: Mon, 15 Dec 2008 09:15:22 -0800 > > > Von: "Jacob Danner" > > > An: user@xmlbeans.apache.org > > > Betreff: Re: parse a part of xml > > > > > Hi Eugen, > > > Are you having troubles getting the value of the projectdataset > > > element or are you just getting an exception when you are trying to > > > parse it? > > > Is there a projectDatasetType Class available? Have you tried that? > > > What is the exception you are seeing? > > > -jacobd > > > > > > On Mon, Dec 15, 2008 at 1:41 AM, Eugen Okon wrote: > > > > Hello, > > > > i am new to xmlbeans, so maybe my question is a kind of "basics" > for the > > > framework. I am writing an application which communicates with Ms > Project > > > PSI Web Services. The application gets a SOAP response from Ms > Project. The > > > structure of this response is described below: > > > > > > > > > > > > â¦.. > > > > > > > > > > > >⦠> > > > > > > >Information I need > > > > > > > >⦠> > > > > > > > > > > > > > > > > > > > Ok so now I can finally describe the problem. I have a xsd schema > which > > > models the structure of . From these xsd I've > generated > > > java code with xmlbeans's ant task. Now I am searching for an elegant > > > possibility to parse this kind of responses. This means > > > ProjectDataSetDocument.Factory.parse(is); should parse the > inputstream beginning wit > h the > > > . In other cases I am understandably getting an > exception. I hope > > > someone can help me solving this problem. > > > > > > > > Eugen > > > > > > > > -- > > > > Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit > > > allen: http://www.gmx.net/de/go/multimessenger > > > > &
Re: parse a part of xml
How are you handing the SOAP protocol messages? I have done this in the past by utilizing AXIS running in a Tomcat container to decode the SOAP messages. AXIS includes a wsdl2java utility to generate server-side stubs and implementation classes. Then you can use XMLBeans to process the contents of the SOAP messages. - Andy On Tue, 16 Dec 2008 08:55:15 +0100 "Eugen Okon" wrote: > Hi Jacob, > thanks a lot for your answer! > There is no problem to get the values of the projectdataset, in the case > that i copy/p aste the > >Information I need > > part to a new file and use it. The exception is caused (in my opinion) > because the roo t element of the doc i am trying to parse is and not . What i am searching for is a possibility to tell the parser to skip all tags till . The Exception i get is: > > error: The document is not a > projectdata...@http://schemas.microsoft.com/office/projec t/server/webservices/ProjectDataSet/: document element mismatch got envel...@http:// schemas.xmlsoap.org/soap/envelope/ > at > org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:458) > at > org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:363) > > with best regards > Eugen > Original-Nachricht > > Datum: Mon, 15 Dec 2008 09:15:22 -0800 > > Von: "Jacob Danner" > > An: user@xmlbeans.apache.org > > Betreff: Re: parse a part of xml > > > Hi Eugen, > > Are you having troubles getting the value of the projectdataset > > element or are you just getting an exception when you are trying to > > parse it? > > Is there a projectDatasetType Class available? Have you tried that? > > What is the exception you are seeing? > > -jacobd > > > > On Mon, Dec 15, 2008 at 1:41 AM, Eugen Okon wrote: > > > Hello, > > > i am new to xmlbeans, so maybe my question is a kind of "basics" for the > > framework. I am writing an application which communicates with Ms Project > > PSI Web Services. The application gets a SOAP response from Ms Project. The > > structure of this response is described below: > > > > > > > > > â¦.. > > > > > > > > >⦠> > > > > >Information I need > > > > > >⦠> > > > > > > > > > > > > > > Ok so now I can finally describe the problem. I have a xsd schema which > > models the structure of . From these xsd I've generated > > java code with xmlbeans's ant task. Now I am searching for an elegant > > possibility to parse this kind of responses. This means > > ProjectDataSetDocument.Factory.parse(is); should parse the inputstream > > beginning wit h the > > . In other cases I am understandably getting an exception. > > I hope > > someone can help me solving this problem. > > > > > > Eugen > > > > > > -- > > > Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit > > allen: http://www.gmx.net/de/go/multimessenger > > > > > > - > > > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > > > For additional commands, e-mail: user-h...@xmlbeans.apache.org > > > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > > For additional commands, e-mail: user-h...@xmlbeans.apache.org > > -- > Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL > für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a > > - > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org > - Andy Andris Putnins, Principal Lett Engineeringphone: (847) 997-0002 300 Bramble Lanefax:(847) 550-0633 Deer Park, IL 60011 email: putn...@lett.com - To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org
Re: parse a part of xml
Hi Jacob, thanks a lot for your answer! There is no problem to get the values of the projectdataset, in the case that i copy/paste the Information I need part to a new file and use it. The exception is caused (in my opinion) because the root element of the doc i am trying to parse is and not . What i am searching for is a possibility to tell the parser to skip all tags till . The Exception i get is: error: The document is not a projectdata...@http://schemas.microsoft.com/office/project/server/webservices/ProjectDataSet/: document element mismatch got envel...@http://schemas.xmlsoap.org/soap/envelope/ at org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:458) at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:363) with best regards Eugen Original-Nachricht > Datum: Mon, 15 Dec 2008 09:15:22 -0800 > Von: "Jacob Danner" > An: user@xmlbeans.apache.org > Betreff: Re: parse a part of xml > Hi Eugen, > Are you having troubles getting the value of the projectdataset > element or are you just getting an exception when you are trying to > parse it? > Is there a projectDatasetType Class available? Have you tried that? > What is the exception you are seeing? > -jacobd > > On Mon, Dec 15, 2008 at 1:41 AM, Eugen Okon wrote: > > Hello, > > i am new to xmlbeans, so maybe my question is a kind of "basics" for the > framework. I am writing an application which communicates with Ms Project > PSI Web Services. The application gets a SOAP response from Ms Project. The > structure of this response is described below: > > > > > > ….. > > > > > >… > > > >Information I need > > > >… > > > > > > > > > > Ok so now I can finally describe the problem. I have a xsd schema which > models the structure of . From these xsd I've generated > java code with xmlbeans's ant task. Now I am searching for an elegant > possibility to parse this kind of responses. This means > ProjectDataSetDocument.Factory.parse(is); should parse the inputstream > beginning with the > . In other cases I am understandably getting an exception. I > hope > someone can help me solving this problem. > > > > Eugen > > > > -- > > Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit > allen: http://www.gmx.net/de/go/multimessenger > > > > - > > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > > For additional commands, e-mail: user-h...@xmlbeans.apache.org > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org -- Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a - To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org
Re: parse a part of xml
Hi Eugen, Are you having troubles getting the value of the projectdataset element or are you just getting an exception when you are trying to parse it? Is there a projectDatasetType Class available? Have you tried that? What is the exception you are seeing? -jacobd On Mon, Dec 15, 2008 at 1:41 AM, Eugen Okon wrote: > Hello, > i am new to xmlbeans, so maybe my question is a kind of "basics" for the > framework. I am writing an application which communicates with Ms Project PSI > Web Services. The application gets a SOAP response from Ms Project. The > structure of this response is described below: > > > ….. > > >… > >Information I need > >… > > > > > Ok so now I can finally describe the problem. I have a xsd schema which > models the structure of . From these xsd I've generated java > code with xmlbeans's ant task. Now I am searching for an elegant possibility > to parse this kind of responses. This means > ProjectDataSetDocument.Factory.parse(is); should parse the inputstream > beginning with the . In other cases I am understandably > getting an exception. I hope someone can help me solving this problem. > > Eugen > > -- > Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger > > - > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org
parse a part of xml
Hello, i am new to xmlbeans, so maybe my question is a kind of “basics” for the framework. I am writing an application which communicates with Ms Project PSI Web Services. The application gets a SOAP response from Ms Project. The structure of this response is described below: ….. … Information I need … Ok so now I can finally describe the problem. I have a xsd schema which models the structure of . From these xsd I’ve generated java code with xmlbeans’s ant task. Now I am searching for an elegant possibility to parse this kind of responses. This means ProjectDataSetDocument.Factory.parse(is); should parse the inputstream beginning with the . In other cases I am understandably getting an exception. I hope someone can help me solving this problem. Eugen -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger - To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org