[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-user
Subject:    RE: Upgrading XMLBeans questions
From:       "Cezar Andrei" <cezar () bea ! com>
Date:       2007-11-21 21:43:39
Message-ID: BF6B6CA032BA0A429BD924F96765147D6760C7 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

For a SAX parser, use XmlOptions:

    /**
     * By default, XmlBeans uses an internal Piccolo parser,
     * other parsers can be used by providing an XMLReader.
     * For using the default JDK's SAX parser use:
     * xmlOptions.setLoadUseXMLReader(
SAXParserFactory.newInstance().newSAXParser().getXMLReader() );
     *
     * @see XmlObject.Factory#parse(java.io.File, XmlOptions)
     */
    public XmlOptions setLoadUseXMLReader (XMLReader xmlReader);


Or if you want to use a Stax - jsr 173 - pull parser use: 
	XmlObject.Factory.parse ( XMLStreamReader xsr );

 
Cezar

> -----Original Message-----
> From: starlightpurple [mailto:starlightpurple@yahoo.com]
> Sent: Wednesday, November 21, 2007 3:20 PM
> To: user@xmlbeans.apache.org
> Subject: RE: Upgrading XMLBeans questions
> 
> Thank you Cezar and Jacob for your replies.
> 
> I have one more question.  Would you be able to point
> me to the documentation on how I can specify which xml
> parser to use?
> 
> Thanks,
> 
> Monica
> 
> --- Cezar Andrei <cezar@bea.com> wrote:
> 
> > There is also a very slight change on how Cursors
> > work when
> > copying/moving a sub-tree from a document to
> > another. Most likely you
> > don't use this feature.
> > 
> > You should be fine with the upgrade, as Jacob said,
> > if you recompile all
> > your schemas.
> > 
> > Choosing the parser should work the same.
> > 
> > Saxon is used only when selectPath, executeQuery or
> > compilePath methods
> > are called.
> > 
> > Cezar
> > 
> > > -----Original Message-----
> > > From: Jacob Danner [mailto:jacob.danner@gmail.com]
> > > Sent: Wednesday, November 21, 2007 11:16 AM
> > > To: user@xmlbeans.apache.org
> > > Subject: Re: Upgrading XMLBeans questions
> > > 
> > > I'll try to answer a couple of these.
> > > 
> > > re:Saxon, if you aren't using Xpath/Xquery you
> > should be fine.
> > > 
> > > As long as the schemas have been recompiled you
> > should not have any
> > > troubles using the new xmlbeans types
> > > 
> > > On 11/20/07, starlightpurple
> > <starlightpurple@yahoo.com> wrote:
> > > > Hello,
> > > > 
> > > > I am currently using version 1.0.2 of XmlBeans
> > and am
> > > > researching upgrading it to version 2.0.3.  I
> > have
> > > > read through the documentation on this site but
> > have a
> > > > few questions.
> > > > 
> > > > * Am I able to dictate which XML Parser XMLBeans
> > uses?
> > > > 
> > > > 
> > > > * The documentation states the following:
> > > > 
> > > > "Because XMLBeans 2.3.0 is designed to be used
> > with
> > > > Saxon-8.8 for XPath/XQuery support and because
> > Saxon
> > > > is not backwards-compatible, it is strongly
> > > > reccomended that if you use Saxon-8.6.1 with
> > XMLBeans,
> > > > you upgrade to Saxon-8.8"
> > > > 
> > > > If I'm not using XPath/XQuery with XMLBeans is
> > it
> > > > alright if I use an older version of Saxon on
> > the
> > > > classpath?  I assume it should not cause any
> > problems,
> > > > since I'm not using it in XMLBeans.  However, I
> > wanted
> > > > to double check.
> > > > 
> > > > * I recompiled my schema as suggested and tested
> > > > marshalling/un-marshalling a few xml files
> > created
> > > > under 1.0.2 with 2.3.0. I have not encountered
> > any
> > > > problems.  However, would you know of any
> > problems or
> > > > things I should be aware of when making such a
> > switch?
> > > > 
> > > > 
> > > > Thank you,
> > > > 
> > > > Monica
> > > > 
> > > > 
> > > > 
> > > > 
> > > 
> > 
> 
________________________________________________________________________
> > __
> > > __________
> > > > Get easy, one-click access to your favorites.
> > > > Make Yahoo! your homepage.
> > > > http://www.yahoo.com/r/hs
> > > > 
> > > > 
> > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > user-unsubscribe@xmlbeans.apache.org
> > > > For additional commands, e-mail:
> > user-help@xmlbeans.apache.org
> > > > 
> > > > 
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@xmlbeans.apache.org
> > > For additional commands, e-mail:
> > user-help@xmlbeans.apache.org
> > 
> > 
> > Notice:  This email message, together with any
> > attachments, may contain information  of  BEA
> > Systems,  Inc.,  its subsidiaries  and  affiliated
> > entities,  that may be confidential,  proprietary,
> > copyrighted  and/or legally privileged, and is
> > intended solely for the use of the individual or
> > entity named in this message. If you are not the
> > intended recipient, and have received this message
> > in error, please immediately return this by email
> > and then delete it.
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail:
> > user-help@xmlbeans.apache.org
> > 
> > 
> 
> 
> 
> 
> 
________________________________________________________________________
__
> __________
> Be a better pen pal.
> Text or chat with friends inside Yahoo! Mail. See how.
> http://overview.mail.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org


Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic