You can call newCursor() on your XmlObject, and then, using the cursor, move it by calls to toFirstChild() and toNextSibling(), etc until you get to the desired location.
Your approach has 2 pitfalls: 1. It is not the correct query if you're starting from the root of the document (i.e. it doesn't return the node you want) 2. execQuery returns a copy, rather than a pointer to the original object You can look at the tutorial on the website for examples on cursor navigation: http://xmlbeans.apache.org/documentation/tutorial_getstarted.html (in particular, see the section on the cursor) --Yana -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 5:06 AM To: user@xmlbeans.apache.org Subject: XmlCursor Hello there, i have a XmlObject (myXml) with this content: <SequenceContainer name="MyContainer" shortDescription="Blablabla"> <EntryList> <ParameterRefEntry parameterRef="MyPara01"> <LocationInContainerInBits referenceLocation="containerStart"> <FixedValue>319</FixedValue> </LocationInContainerInBits> </ParameterRefEntry> <ParameterRefEntry parameterRef="MyPara02"> <LocationInContainerInBits referenceLocation="containerStart"> <FixedValue>311</FixedValue> </LocationInContainerInBits> </ParameterRefEntry> </EntryList> </SequenceContainer> Now, i will change the "Fixed Value" of "MyPara02". How can i do this? I've tried something like that but it doesn't work :( XmlCursor cursor = myXml.newCursor().execQuery("ParameterRefEntry[parameterRef="MyPara02"]" ); QName test = new QName("FixedValue"); cursor.setAttributeText(test, "123"); Hope for help. Thanks. Christian --------------------------------------------------------------------- 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]