Hello !

Thanks for Your answer. I tried this with success.

Regards, Frank

> -----Ursprüngliche Nachricht-----
> Von: Eric Vasilik [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 1. Juni 2005 20:04
> An: user@xmlbeans.apache.org
> Betreff: Re: problem with namespaces
> 
> 
> You can try wrapping the xml with <xml-fragment xmlns:ehd='moo'>.  The
> parser will remove the xml-fragment and namespace automatically.  If
> you do not have control over the incoming XML, you can wrap the
> InputStream with your own to perform this.
> 
> - Eric
> 
> On 6/1/05, Weiler, Frank (KBV) <[EMAIL PROTECTED]> wrote:
> > Hello !
> > 
> > The following line parses a fragment of a xml-document:
> > 
> > EhdHeaderTyp head = EhdHeaderTyp.Factory.parse(xml);
> > 
> > I get the error: org.apache.xmlbeans.XmlException: error: 
> Use of undefined namespace prefix: ehd
> > 
> > here the xml-fragment to parse:
> > 
> > <ehd:header>
> >  <ehd:id RT="1"/>
> >  <ehd:document_type_cd V="VDX" />
> >  <ehd:service_tmr V="2004-07-31..2004-09-30" />
> >  <ehd:origination_dttm V="2005-04-06" />
> >  <ehd:provider />
> > </ehd:header>
> > 
> > What is the best way do declare the namespace and/or its 
> prefix to the parser without manipulating the xml itself ?
> > 
> > Regards, Frank
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to