logo       

RE: Problems trying to use annotation support in v2: msg#00116

text.xml.xmlbeans.user

Subject: RE: Problems trying to use annotation support in v2

On Wed, 2005-01-19 at 11:31 -0800, Radu Preotiuc-Pietro wrote:
> The "SchemaType for the name attribute"? I don't think you are using the API
> correctly.
> Try getting the annotation off the "name" element directly instead, since the
> element itself is annotated, not the type.
>
> Radu
>
I guess I should be more clear about my goal. I a not trying to read a
document containing a category type. I am trying to create one. I want
to read xs:appinfo elements in the schema to tell my program where to
find the values (Class and Method to call) needed to write the xml file.

It is very possible I am misreading the API documentation, and I would
welcome any help in figuring this out. In metacode, here is what I am
trying to do:

1) Load the main XmlBeans document class
2) Use XmlBeans.typeForClass() to get the Schema Type
3) If there is an appinfo element, process it
4) Use SchemaType.getProperties() to get all elements and attributes
5) For each property, recursively call 2)

Is this the wrong approach? The way I read the doc, the annotation is a
property of the SchemaType, which implements SchemaAnnotated, not of the
XmlObject. As I said, I would welcome and assistance.

--
Jim McMaster
mailto:jmcmaster@xxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise