[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: RE: All elements not appearing in the generated XML
From: zais <zisis.p () gmail ! com>
Date: 2008-11-13 13:09:21
Message-ID: 20480499.post () talk ! nabble ! com
[Download RAW message or body]
Hi this thread is 3 years old and I am still having the same problem.
The new document bean shows only the elements I have explicitly initialised
myself.
Is there a way to initialise an empty xmlbean with all its elements without
explicitly defining each one of them?
Thanks
Zais
Radu Preotiuc-Pietro wrote:
>
> I will now officially (meaning in JIRA ;-) ) add this feature request to
> the list, it's come up before.
>
> Thanks,
> Radu
>
> -----Original Message-----
> From: Springer, Ian P. [mailto:ian.springer@hp.com]
> Sent: Tuesday, May 24, 2005 7:48 AM
> To: dev@xmlbeans.apache.org
> Subject: RE: All elements not appearing in the generated XML
>
>
> I think it would make sense for XMLBeans to automatically add a
> simple-type element if it has a minOccurs>0 and a default or fixed value
> (or provide an option to enable this behavior). It could save the
> developer a lot of initialization code when building up a document.
>
> Ian
>
> > -----Original Message-----
> > From: Radu Preotiuc-Pietro [mailto:radup@bea.com]
> > Sent: Monday, May 23, 2005 6:37 PM
> > To: dev@xmlbeans.apache.org
> > Subject: RE: All elements not appearing in the generated XML
> >
> > Actually, no, it won't. Since there is a difference between
> > an element being present with the default value and an
> > element not being present, the behavior of xmlBeans is to
> > just not add any elements by itself, without the user
> > requesting it explicitly.
> > I don't understand why you would modify your Schema to add
> > ... default="red"
> > rather than modify your Java code to add
> > ... x.addNewColor()
> >
> > Radu
> >
> > -----Original Message-----
> > From: Springer, Ian P. [mailto:ian.springer@hp.com]
> > Sent: Monday, May 23, 2005 8:06 AM
> > To: dev@xmlbeans.apache.org
> > Subject: RE: All elements not appearing in the generated XML
> >
> >
> > Have you tried setting default or fixed values in your schema? e.g.:
> >
> > <xs:element name="Color" type="xs:string" default="red"/>
> > <xs:element name="Color" type="xs:string" fixed="red"/>
> >
> > I'm not sure if XMLBeans automatically instantiates
> > subelements that have default or fixed values, but I would
> > hope that it either automatically does or provides an option to do so.
> >
> > Ian
> >
> > > -----Original Message-----
> > > From: rajsree.lenin@scandent.com [mailto:rajsree.lenin@scandent.com]
> > > Sent: Sunday, May 22, 2005 3:43 AM
> > > To: dev@xmlbeans.apache.org
> > > Cc: gshyam_reddy@yahoo.com; cezar@bea.com
> > > Subject: All elements not appearing in the generated XML
> > >
> > > Hi
> > >
> > > We need all the elements that are defined in the XSD to
> > appear in the
> > > XML.
> > > Using xmlBeans we specifically set certain elements & hence those
> > > elements appear in the XML. The elements which are not
> > explicitly set
> > > using xmlBeans does not appear in the XML. Is there a way (xsd
> > > indicator) in the XSD to enforce a particular element to
> > appear in the
> > > XML even if it does not hold any value?
> > >
> > > Could you pls help me on this?
> > >
> > > Regards,
> > > -----------------------------------------------------------------
> > > Rajshree Lenin
> > > Extension : 706.
> > > ------------------------------------------------------------------
> > > Important Email Information :- The information in this email is
> > > confidential and may be legally privileged. It is
> > intended solely
> > > for the addressee. Access to this email by anyone else is
> > > unauthorized. If you are not the intended recipient, any
> > disclosure,
> > > copying, distribution or any action taken or omitted to be taken in
> > > reliance on it, is prohibited and may be unlawful. If you
> > are not the
> > > intended addressee please contact the sender and dispose of this
> > > e-mail immediately.
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> > > For additional commands, e-mail: dev-help@xmlbeans.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: dev-help@xmlbeans.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: dev-help@xmlbeans.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
>
>
>
--
View this message in context: \
http://www.nabble.com/RE%3A-All-elements-not-appearing-in-the-generated-XML-tp153189p20480499.html
Sent from the Xml Beans - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic