Re: Adding/Removing xml documents as xs:any

2009-06-17 Thread Kapil Anand
I found a way in the API to circumvent the Java reflection code i posted earlier. SchemaTypeLoader.newInstance(SchemaType, XmlOptions) creates the empty typed XmlObject hope this helps others. regards kapil Kapil Anand wrote: > > hi > I am running into problem while trying to e

Re: Adding/Removing xml documents as xs:any

2009-06-17 Thread Kapil Anand
s insertion into the parent as xsd:any thanks regards kapil Kapil Anand wrote: > > hi > I am running into problem while trying to extract an xs:any as a typed > XMLObject. > I am writing code that is not aware of the actual concrete types but > responsible for inserting and ex

Adding/Removing xml documents as xs:any

2009-06-16 Thread Kapil Anand
hi I am running into problem while trying to extract an xs:any as a typed XMLObject. I am writing code that is not aware of the actual concrete types but responsible for inserting and extracting XmlObjects as xs:any (and dynamically converting to concrete type while extracting) I have following:

RE: Navigating Untyped XmlObject with XmlCursor

2009-03-12 Thread Kapil Anand
oking for: > http://xmlbeans.apache.org/docs/2.4.0/reference/org/apache/xmlbeans/XmlOptions.html#setSaveOuter(). > > Cezar > >> -Original Message- >> From: Kapil Anand [mailto:kapil...@yahoo.com] >> Sent: Wednesday, March 11, 2009 10:20 PM >> To: user@

Re: Navigating Untyped XmlObject with XmlCursor

2009-03-11 Thread Kapil Anand
the cursor name that represented the container element. 2) newObj = XMLObject.Factory.newInstance() newObj.set(xmlObj); This one threw exception: org.apache.xmlbeans.impl.values.XmlValueDisconnectedException I would appreciate any help or ideas. regards kapil Kapil Anand wrote: > > Than

Re: Navigating Untyped XmlObject with XmlCursor

2009-03-11 Thread Kapil Anand
Thanks for replying Jacob. I tried cursor.child(1) but it returns false. (child index 1 anyway represents the second child of the current cursor position and i need to select the first child). This is what i am inferring from the behavior of the api: When i start with the XmlObject that represent

Navigating Untyped XmlObject with XmlCursor

2009-03-11 Thread Kapil Anand
hi I am struggling to select the contents of the first child of an untyped root element. The qname of the child is not known but the position is, so I am using xmlCursor.toFirstChild() XmlCursor code works fine if there is only one child under the root element, but it fails if there are more than