2nd Post. Help! Search and Replace...Re: How to edit data in a specific part of an XMLObject

2007-08-15 Thread bob bob
Anyone? Basically I want a search and replace. I can grab the XMLObject (WIPKEYSDocument) but can't replace it with another WIPKEYSDocument. Please?! Anyone? - Original Message From: bob bob [EMAIL PROTECTED] To: user@xmlbeans.apache.org Sent: Tuesday, August 14, 2007 3:52:32 PM

RE: 2nd Post. Help! Search and Replace...Re: How to edit data in a specific part of an XMLObject

2007-08-15 Thread Cezar Andrei
Bob, The wipkeys array returned from selectPath() method is just a copy, it's not a live object in XMLBeans structures, so modifying it will not change the original document. You should call wipkeys[0].set(keys.getWIPKEYS()); or locate it's parent and call

Re: 2nd Post. Help! Search and Replace...Re: How to edit data in a specific part of an XMLObject

2007-08-15 Thread bob bob
Thanks. But now the problem is, how do I get a reference to the parent? I thought I was getting a reference with selectPath() but apparently not. The XML file is HUGE with tons of elements, data, etc. There is only one instance of WIPKEYS so I would just like to replace what's there. If I get a

Re: 2nd Post. Help! Search and Replace...Re: How to edit data in a specific part of an XMLObject

2007-08-15 Thread Jacob Danner
If you use the other method Cezar mentioned parent.setWIPKEYS(keys.getWIPKEYS()) you can replace the entire WIPKEYS array. Otherwise if you only want to replace one at a time there are some methods for that too like insert, etc. -Jacob Danner On 8/15/07, bob bob [EMAIL PROTECTED] wrote: Thanks.

RE: 2nd Post. Help! Search and Replace...Re: How to edit data in a specific part of an XMLObject

2007-08-15 Thread Cezar Andrei
To get the parent you can use the cursor API or write a more specific xpath something like /a/b/c/.. . Cezar From: bob bob [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 15, 2007 4:10 PM To: user@xmlbeans.apache.org Subject: Re: 2nd Post. Help! Search

Re: 2nd Post. Help! Search and Replace...Re: How to edit data in a specific part of an XMLObject

2007-08-15 Thread bob bob
The problem is getting access to the parent. If you look at the XML below, there are many SERVICE elements with only one with a WIPKEYS. How do I get access to the SERVICE or SERVICEDocument to replace the specific (and only) WIPKEYS. Can I see some code? What you guys are describing sounds

How to edit data in a specific part of an XMLObject

2007-08-14 Thread bob bob
I have and XMLObject node I find by using an XPath expression in my XMLObject root element (XMLINIDocument). It finds this XMLObject (there is only one instance) but I want to replace it with another one. How do I do this? ** XML DOCUMENT ** XMLINI CONFIG SERVICES SERVICE