You can do this in XmlBeans by using the XmlCursor.setName() and XmlCursor.setTextValue() methods. This is the most efficient way and it's easy enough to code, IMO.
Alteratively, XMLBeans supports XQuery via Saxon integration, but, as far as I know, in XQuery you can't change a document "in-place" and you basically need to create a new doc with everything from the original doc in it, except the elements which now need to have new names. Way more trouble than it's worth. Radu > -----Original Message----- > From: dave [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 06, 2008 7:57 PM > To: [email protected]; [EMAIL PROTECTED] > Subject: Re: search and replace kind of operations with XML > > > Am already using XmlBeans. I would need to see how I can > integrate VTD-XML with XMLBeans. > > I agree with you that VTD-XML is an ideal match for what I > want to accomplish. I would still prefer if XmlBeans offers > anything on this line. > > Thanks Jimmy. > > dave > --- jimmy Zhang <[EMAIL PROTECTED]> wrote: > > > I think you may find VTD-XML ideally suited for this > (better than any > > other technologies AFAIK ) because of its incremental update > > capability and built-in XPath > > > > > http://www.javaworld.com/javaworld/jw-07-2006/jw-0724-vtdxml.html > > > > http://www.devx.com/xml/Article/36379 > > > > > > ----- Original Message ----- > > From: "dave" <[EMAIL PROTECTED]> > > To: <[email protected]>; > > <[EMAIL PROTECTED]> > > Sent: Wednesday, February 06, 2008 7:39 PM > > Subject: search and replace kind of operations with XML > > > > > > > > > > For a given XML input, I would need to perform > > 'Search > > > and Replace' operation on Element/Attribute Tag > > names > > > and values. The resultant output is a transformed > > XML. > > > Since I would like to change both Tags and Values, > > > what is the best way to accomplish this? XSLT or > > > Xpath/XQuery or combination of both? > > > > > > OR are there any special apis in XmlBeans to > > > accomplish this? > > > > ______________________________________________________________ > ______________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

