[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    Re: somebody tell me how to parse xsd files with xmlbeans?
From:       Jacob Danner <jacob.danner () gmail ! com>
Date:       2009-03-10 7:51:05
Message-ID: bb04eb0a0903100051j63ef7376i3621149b51146bc7 () mail ! gmail ! com
[Download RAW message or body]

Have you taken a peek in the user mailing list archives? I think this same
(or at least real similar (how to get attributes)) question was answered on
the mailing list a few days ago.
The user list is more appropriate for these usage kind of questions.

-jacobd

On Tue, Mar 10, 2009 at 12:37 AM, anchorTan <tantingfang@163.com> wrote:

>
> i want to get the detail structure of each xs:element in the schema file,
> and i tried with the following codes in the xmlbeans2.0 api document:
>
> schemaList.addAll(Arrays.asList(schemaTypeSys.documentTypes()));
> schemaList.addAll(Arrays.asList(schemaTypeSys.attributeTypes()));
> schemaList.addAll(Arrays.asList(schemaTypeSys.globalTypes()));
> for (int i = 0; i < schemaList.size(); i++) {
> SchemaType sType = (SchemaType) schemaList.get(i);
> //System.out.println("sType
> name=="+sType.getName()+",issimpletype=="+sType.isSimpleType());
> chemaList.addAll(Arrays.asList(sType.getAnonymousTypes()));
> }
>
> and with the above codes, i can get get the shemaType's attribute
> information.but some elements such as:
> <xs:element name="test">
>  <xs:complexType>
>    <xs:attributeGroup ref="something"/>
>  </xs:complexType>
> </xs:element>
>
> i cannot get these elements' attribute information. somebody met this
> situations  please help me!
> --
> View this message in context:
> http://www.nabble.com/somebody-tell-me-how-to-parse-xsd-files-with-xmlbeans--tp22429276p22429276.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
>
>

[Attachment #3 (text/html)]

Have you taken a peek in the user mailing list archives? I think this same (or at \
least real similar (how to get attributes)) question was answered on the mailing list \
a few days ago.<br>The user list is more appropriate for these usage kind of \
questions.<br> <br>-jacobd<br><br><div class="gmail_quote">On Tue, Mar 10, 2009 at \
12:37 AM, anchorTan <span dir="ltr">&lt;<a \
href="mailto:tantingfang@163.com">tantingfang@163.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>
i want to get the detail structure of each xs:element in the schema file,<br>
and i tried with the following codes in the xmlbeans2.0 api document:<br>
<br>
schemaList.addAll(Arrays.asList(schemaTypeSys.documentTypes()));<br>
schemaList.addAll(Arrays.asList(schemaTypeSys.attributeTypes()));<br>
schemaList.addAll(Arrays.asList(schemaTypeSys.globalTypes()));<br>
for (int i = 0; i &lt; schemaList.size(); i++) {<br>
SchemaType sType = (SchemaType) schemaList.get(i);<br>
//System.out.println(&quot;sType<br>
name==&quot;+sType.getName()+&quot;,issimpletype==&quot;+sType.isSimpleType());<br>
chemaList.addAll(Arrays.asList(sType.getAnonymousTypes()));<br>
}<br>
<br>
and with the above codes, i can get get the shemaType&#39;s attribute<br>
information.but some elements such as:<br>
&lt;xs:element name=&quot;test&quot;&gt;<br>
  &lt;xs:complexType&gt;<br>
    &lt;xs:attributeGroup ref=&quot;something&quot;/&gt;<br>
  &lt;/xs:complexType&gt;<br>
&lt;/xs:element&gt;<br>
<br>
i cannot get these elements&#39; attribute information. somebody met this<br>
situations  please help me!<br>
<font color="#888888">--<br>
View this message in context: <a \
href="http://www.nabble.com/somebody-tell-me-how-to-parse-xsd-files-with-xmlbeans--tp22429276p22429276.html" \
target="_blank">http://www.nabble.com/somebody-tell-me-how-to-parse-xsd-files-with-xmlbeans--tp22429276p22429276.html</a><br>


Sent from the Xml Beans - Dev mailing list archive at Nabble.com.<br>
<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe, e-mail: <a \
href="mailto:dev-unsubscribe@xmlbeans.apache.org">dev-unsubscribe@xmlbeans.apache.org</a><br>
 For additional commands, e-mail: <a \
href="mailto:dev-help@xmlbeans.apache.org">dev-help@xmlbeans.apache.org</a><br> <br>
</font></blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic