Say you have an element as 'XmlObject element' and you are interested in
finding out if attribute 'att' is allowed or not.

SchemaType type = element.schemaType();
boolean isAttAllowed = type.getAttributeProperty(new QName("", "att"))
!= null;

Note that this will not handle the case in which there are attribute
wildcards, if you have that (<anyAttribute>) then also take a look at
SchemaType.qnameSetForWildcardAttributes().

Radu

-----Original Message-----
From: zas [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 2:21 AM
To: [email protected]
Subject: Allowed attributes


I need to find out whether it is allowed adding a certain attribute.

I compare XMLs and need to flag changed elements with an attribute.
Unfortunately some elements can have this change attribute and some
cannot.

Can anybody help me.

Thanks
--
View this message in context:
http://www.nabble.com/Allowed-attributes-tf2176156.html#a6016873
Sent from the Xml Beans - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to