that got me over the hump..
..altho' I found a few other ref.s that were [more] helpful
a comment or two on your Wiki page, then those ref.s
:
I know I came to this page outside of any context that might be assumed..
(ieg: going thr' the tutorial)
..but for me, anyway, it would've been helpful to state what the problem is up front.
(ie: "this is hard, bec. xmlBeans doesn't directly support _____")
Some characters show up weird on my screen
(Wds XP Pro, IE 6.0.2900...)
:
---
re: xmlBeans learning / tutorials in general:
I tried to dutifully read what I was able to find..
(in order to learn stuff relevant to my problem that - the preferred - way)
..but I didn't find anything starting from the top-level of the site
If the wiki tutorial is different, it'd be good to advertize it somehow
---
useful found ref.s:
http://mail-archives.apache.org/mod_mbox/xml-xmlbeans-dev/200402.mbox/[EMAIL PROTECTED]
http://mail-archives.apache.org/mod_mbox/xmlbeans-user/200503.mbox/[EMAIL PROTECTED]
http://xmlbeans.apache.org/docs/2.0.0/guide/conNavigatingXMLwithCursors.html
& of course:
http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlCursor.html#copyXml(org.apache.xmlbeans.XmlCursor )
&
http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlObject.html
...but even given all that, it was still very difficult to figure out what to do.
It may be significantly due to my/our trying to get too much mileage out of xmlBeans w/o enf knowledge of xml in general.
(altho I though I had a lot! ;-)
thanks again,
-- M.
At 04:26 AM 5/17/2005, you wrote:
Try this link on the Wiki ...
http://wiki.apache.org/xmlbeans/XmlBeansTutorial/MixedContent
I know your not doing mixed content but it does show how to add the
element etc.
Don
-----Original Message-----
From: P. Michael Hutchins [ mailto:[EMAIL PROTECTED]]
Sent: 16 May 2005 17:56
To: [email protected]
Subject: RE: Sequence of <any>, Writing
Could someone please post some example code that shows how to actually
do this (your "But using the lower interfaces XmlCursor or DOM, elements
and attributes can be added, removed or modified, in the right place.")
To get off the ground, suppose I have an XmlObject, A, that I want to
...
in effect, .add() ... to another XmlObject, B.
Looking through the available methods - for both XmlObject and XmlCursor
- I didn't find anything at all promising..
..and trying to punt down to Node, I couldn't figure out how to get from
the world of xmlBeans to the world of DOM.
(or vice versa)
How do people live w/o an ability to do this stuff?
How is it that it doesn't come up so often that there's already info on
your site on how to deal w/ it?
(We were presented w/ a schema that calls for this; we can't change it.)
(additionally: Is using <all> always/often a bad / suboptimal idea?)
Thanks,
-- M.
At 05:36 PM 5/12/2005, you wrote:
> From the XmlObject and generated interfaces level there isn't a
straight
>forward way to alter the elements in the any buckets, there is just
read
>access through selectElements/selectAttributes.
>But using the lower interfaces XmlCursor or DOM, elements and
attributes
>can be added, removed or modified, in the right place.
>
>For your example all the child elements are in the 'any' bucket, but
for
>more complex content models partial validation might be needed to find
>the right place.
>
>Cezar
>
> > -----Original Message-----
> > From: P. Michael Hutchins [ mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 12, 2005 2:42 PM
> > To: [email protected]
> > Subject: Sequence of <any>, Writing
> >
> > (no allegation of lack of stupidity herein ;-)
> >
> > When one specifies in a schema a sequence of element, xmlbeans makes
>the
> > expected .add...() method..
> > (at least if the min- & max- -Occurs is specified)
> >
> > ..but for a sequence of <any>, there's no such method available.
> >
> >
> > Searching your site, I found some mumbling stating realization that
> > xmlbeans doesn't ... what? support? ... <any> (, etc.).
> > (which original statement, I did not find)
> >
> > I wasn't able to find anything on [sequence of <any>], so I ask:
> >
> > What's the best way to create a(n XML instance document containing
a)
> > sequence of <any> elements?
> > (given that one is using the classes that scomp produced from the
XSD)
> >
> > eg:
> >
> > for an XSD containing:
> >
> > <xs:complexType name="foo">
> > <xs:sequence minOccurs="1" maxOccurs="232">
> > <xs:any processContents="lax" minOccurs="0"
>maxOccurs="unbounded"/>
> > </xs:sequence>
> > <xs:attribute name="priority" type="xs:string"
> > use="optional"> </xs:attribute>
> > </xs:complexType>
> >
> > , once one has a foo object in his hand, how's best to ~.add()~
>whatever
> > ... elements(?) ... one has?
> > (suppose I have more than one such thingy I want to put in where the
> > xs:any is)
> >
> >
> > Thanks,
> >
> > -- M.
> >
> >
> >
---------------------------------------------------------------------
> > 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]
---------------------------------------------------------------------
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]

