You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by Apache Wiki <wi...@apache.org> on 2011/11/05 11:35:43 UTC
[Xmlbeans Wiki] Update of "XmlBeansFaq" by Tom Beckers
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Xmlbeans Wiki" for change notification.
The "XmlBeansFaq" page has been changed by Tom Beckers:
http://wiki.apache.org/xmlbeans/XmlBeansFaq?action=diff&rev1=295&rev2=296
##language:en
#pragma section-numbers off
= XMLBeans FAQ =
+ *
- * '''[[#community|General Community Questions]] * '''
+ '''[[#community|General Community Questions]] * '''
+
+ *
- * [[#mailingLists|What are the different XMLBeans Mailing Lists?]]
+ [[#mailingLists|What are the different XMLBeans Mailing Lists?]]
+
+ *
- * [[#committers|Who are the XMLBeans Committers?]]
+ [[#committers|Who are the XMLBeans Committers?]]
+
+ *
- * [[#fileBug|Where do I file a bug for XMLBeans?]]
+ [[#fileBug|Where do I file a bug for XMLBeans?]]
+
+
+ *
- * '''[[#gettingStarted|Getting Started]]'''
+ '''[[#gettingStarted|Getting Started]]'''
+
+ *
- * [[#downloadBinary|Where can I download the latest release of XMLBeans?]]
+ [[#downloadBinary|Where can I download the latest release of XMLBeans?]]
+
+ *
- * [[#latestVersion|What is the latest version of XMLBeans?]]
+ [[#latestVersion|What is the latest version of XMLBeans?]]
+
+ *
- * [[#gettingStartedDoc|How do I get started coding with XMLBeans?]]
+ [[#gettingStartedDoc|How do I get started coding with XMLBeans?]]
+
+ *
- * [[#xmlbeansSource|How can I get the latest XMLBeans source code in svn?]]
+ [[#xmlbeansSource|How can I get the latest XMLBeans source code in svn?]]
+
+ *
- * [[#buildingXMLBeans|How do I build XMLBeans from source?]]
+ [[#buildingXMLBeans|How do I build XMLBeans from source?]]
+
+ *
- * [[#viewXMLBeansOnline|Can I view the XMLBeans Source Code online, without having svn on my machine?]]
+ [[#viewXMLBeansOnline|Can I view the XMLBeans Source Code online, without having svn on my machine?]]
+
+ *
- * [[#viewJavaDoc|Is the XMLBeans javadoc available online?]]
+ [[#viewJavaDoc|Is the XMLBeans javadoc available online?]]
+
+ *
- * [[#whatJars|What jars do I need on the classpath to use XMLBeans?]]
+ [[#whatJars|What jars do I need on the classpath to use XMLBeans?]]
+
+ *
- * [[#qname|Running my code that used to work fails with "java.lang.NoClassDefFoundError: javax/xml/namespace/QName" after upgrading to 2.3.0]]
+ [[#qname|Running my code that used to work fails with "java.lang.NoClassDefFoundError: javax/xml/namespace/QName" after upgrading to 2.3.0]]
+
+ *
- * [[#scompFindingJavac|The scomp program can't find javac and fails with java.io.IOException on Windows!]]
+ [[#scompFindingJavac|The scomp program can't find javac and fails with java.io.IOException on Windows!]]
+
+ *
- * [[#scompOutOfMemory|The scomp program gives OutOfMemoryError when compiling my complex Schema!]]
+ [[#scompOutOfMemory|The scomp program gives OutOfMemoryError when compiling my complex Schema!]]
+
+ *
- * [[#codeTooLarge|The scomp fails with code too large error!]]
+ [[#codeTooLarge|The scomp fails with code too large error!]]
+
+
+ *
- * '''[[#generalXbeans|General XMLBeans Questions]]'''
+ '''[[#generalXbeans|General XMLBeans Questions]]'''
+
+ *
- * [[#PCDATComplexType|How can I write the PCDATA in Element which is complexType?]]
+ [[#PCDATComplexType|How can I write the PCDATA in Element which is complexType?]]
+
+ *
- * [[#javaType4SchemaTypes|What Java types are created for a particular schema type?]]
+ [[#javaType4SchemaTypes|What Java types are created for a particular schema type?]]
+
+ *
- * [[#configPackageName|Can I change the default package names for the java classes generated from my schema?]]
+ [[#configPackageName|Can I change the default package names for the java classes generated from my schema?]]
+
+ *
- * [[#deepEquals|Is there a way to do a ''deep equals'' between two Xmlobjects?]]
+ [[#deepEquals|Is there a way to do a ''deep equals'' between two Xmlobjects?]]
+
+ *
- * [[#suggestedPrefixes|How can I influence the namespace prefix used when saving/printing out my XML?]]
+ [[#suggestedPrefixes|How can I influence the namespace prefix used when saving/printing out my XML?]]
+
+ *
- * [[#xsiSchemaLocation|How can I instruct XMLBeans to add the xsi:schemaLocation attribute to my documents?]]
+ [[#xsiSchemaLocation|How can I instruct XMLBeans to add the xsi:schemaLocation attribute to my documents?]]
+
+ *
- * [[#selectPath|Is selectPath(...) on XmlObject and XmlCursor working?]]
+ [[#selectPath|Is selectPath(...) on XmlObject and XmlCursor working?]]
+
+ *
- * [[#execQuery|Is execQuery(...) on XmlObject and XmlCursor working?]]
+ [[#execQuery|Is execQuery(...) on XmlObject and XmlCursor working?]]
+
+ *
- * [[#xsdConfig|How do I modify the generated interfaces?]]
+ [[#xsdConfig|How do I modify the generated interfaces?]]
+
+ *
- * [[#cdataOptions|How do I control CDATA?]]
+ [[#cdataOptions|How do I control CDATA?]]
+
+
+ *
- * '''[[#somQuestions|Schema Object Model Questions]] '''
+ '''[[#somQuestions|Schema Object Model Questions]] '''
+
+ *
- * [[#introToSTS|Is there an introduction document on the XMLBeans Schema Type System?]]
+ [[#introToSTS|Is there an introduction document on the XMLBeans Schema Type System?]]
+
+ *
- * [[#schemaType2Javaname|How do I get the java name for a schema type?]]
+ [[#schemaType2Javaname|How do I get the java name for a schema type?]]
+
+ *
- * [[#schemaAnnotation|How do I get to SchemaAnnotation and SchemaIdentityConstraint on elements?]]
+ [[#schemaAnnotation|How do I get to SchemaAnnotation and SchemaIdentityConstraint on elements?]]
+
+ *
- * [[#schemaPropertySchemaParticle|What is the difference between SchemaProperty and SchemaParticle?]]
+ [[#schemaPropertySchemaParticle|What is the difference between SchemaProperty and SchemaParticle?]]
+
+ *
- * [[#substGroups|How do I use substitution groups?]]
+ [[#substGroups|How do I use substitution groups?]]
+
+ *
- * [[#schemaDependencies|How do I compile multiple schema files with dependencies?]]
+ [[#schemaDependencies|How do I compile multiple schema files with dependencies?]]
+
+
+ *
- * '''[[#xmlCursor|XmlCursor API]]'''
+ '''[[#xmlCursor|XmlCursor API]]'''
+
+ *
- * [[#navigatingXmlCursor|Is there documentation on navigating with XmlCursor?]]
+ [[#navigatingXmlCursor|Is there documentation on navigating with XmlCursor?]]
+
+ *
- * [[#usingBookmarks|How do I use Bookmarks to annotate XML?]]
+ [[#usingBookmarks|How do I use Bookmarks to annotate XML?]]
+
+
----
<<Anchor(community)>>
@@ -66, +147 @@
XMLBeans uses Jira for bugtracking.
+ *
- * [[https://issues.apache.org/jira/browse/xmlbeans#selectedTab=com.atlassian.jira.plugin.system.project:summary-panel|Go to XMLBeans JIRA]]
+ [[https://issues.apache.org/jira/browse/xmlbeans#selectedTab=com.atlassian.jira.plugin.system.project:summary-panel|Go to XMLBeans JIRA]]
+
+ *
- * [[https://issues.apache.org/jira/browse/xmlbeans|See reporting information of XMLBeans JIRA issues]]
+ [[https://issues.apache.org/jira/browse/xmlbeans|See reporting information of XMLBeans JIRA issues]]
+
<<Anchor(gettingStarted)>>
@@ -100, +185 @@
----
<<Anchor(whatJars)>> '''What jars do I need on the classpath to use XMLBeans?'''
+ *
- * The obvious one is ''xbean.jar'', which contains the XMLBeans code. ''scomp.cmd'' includes trailing periods after this on v1.0.4, which may cause problems under Windows XP.
+ The obvious one is ''xbean.jar'', which contains the XMLBeans code. ''scomp.cmd'' includes trailing periods after this on v1.0.4, which may cause problems under Windows XP.
+
+ *
- * For XMLBeans V1, this is all you need, but for XMLBeans 2, the JSR173 API jar is also required, since it contains classes that XMLBeans depends on. For XMLBeans 2.0.0, the name of the jar is ''jsr173_api.jar'' and for XMLBeans 2.1.0, it's ''jsr173_1.0_api.jar''. In both cases, the jar comes with the XMLBeans binary distribution (for source distributions, the build process will download it and place it in the ''build/lib'' directory.
+ For XMLBeans V1, this is all you need, but for XMLBeans 2, the JSR173 API jar is also required, since it contains classes that XMLBeans depends on. For XMLBeans 2.0.0, the name of the jar is ''jsr173_api.jar'' and for XMLBeans 2.1.0, it's ''jsr173_1.0_api.jar''. In both cases, the jar comes with the XMLBeans binary distribution (for source distributions, the build process will download it and place it in the ''build/lib'' directory.
+
* For JDK 1.4 users, as of XMLBeans 2.3.0 it has become necessary to also include xmlbeans-qname.jar
+ *
- * If XPath/XQuery support is required, the ''xbean_xpath.jar'' contains the XPath "glue" code and needs to be included on the classpath. Then, depending on the version of XMLBeans in use, the following are also required: ''jaxen.jar'' for XMLBeans V1 (only supports XPath, no XQuery), ''saxon8.jar'' for XMLBeans V2.0.0 and V2.1.0 (the only version supported is Saxon 8.1.1), ''saxon8.jar'' and ''saxon8-dom.jar'' for XMLBeans built from SVN head (this supports Saxon >= 8.6.1).
+ If XPath/XQuery support is required, the ''xbean_xpath.jar'' contains the XPath "glue" code and needs to be included on the classpath. Then, depending on the version of XMLBeans in use, the following are also required: ''jaxen.jar'' for XMLBeans V1 (only supports XPath, no XQuery), ''saxon8.jar'' for XMLBeans V2.0.0 and V2.1.0 (the only version supported is Saxon 8.1.1), ''saxon8.jar'' and ''saxon8-dom.jar'' for XMLBeans built from SVN head (this supports Saxon >= 8.6.1).
+
+
||XMLBeans version ||Saxon supported version ||
||v2.4.0 ||Saxon-9.0.0.4 ||
||v2.3.0 ||Saxon-8.8 ||
@@ -114, +206 @@
+
+
+ *
- * In addition to those, compiling Schemas using the scomp script requires ''tools.jar'' from the JDK and ''resolver.jar'' from Apache xml-commons (the latter one only in case support for OASIS XML catalogs for resolving external entities is needed).
+ In addition to those, compiling Schemas using the scomp script requires ''tools.jar'' from the JDK and ''resolver.jar'' from Apache xml-commons (the latter one only in case support for OASIS XML catalogs for resolving external entities is needed).
+
+ *
- * We make another jar available, ''xmlpublic.jar'', which contains the classes in the "org.apache.xmlbeans" package. If your code can be compiled with ''xmlpublic.jar'' on the classpath instead of the full ''xbean.jar'', it means that your code uses only "public", supported APIs and will likely not need any modification if you need to upgrade to a newer XMLBeans version.
+ We make another jar available, ''xmlpublic.jar'', which contains the classes in the "org.apache.xmlbeans" package. If your code can be compiled with ''xmlpublic.jar'' on the classpath instead of the full ''xbean.jar'', it means that your code uses only "public", supported APIs and will likely not need any modification if you need to upgrade to a newer XMLBeans version.
+
----
<<Anchor(qname)>> '''Running my code that used to work fails with "java.lang.!NoClassDefFoundError: javax/xml/namespace/QName" after upgrading to 2.3.0'''
@@ -196, +294 @@
----
<<Anchor(javaType4SchemaTypes)>> '''What Java types are created for a particular schema type?'''
+ .
- . '''User Derived Schema Types''' When you compile XML schema, the resulting API is made up of two categories of types: built-in types that mirror those in the schema specification and others that are generated from user-derived schema types. This topic provides an overview of the Java types generated for user-derived types, describing the methods the Java types provide ... [[http://xmlbeans.apache.org/docs/2.0.0/guide/conJavaTypesGeneratedFromUserDerived.html|Java Types Generated from User-Derived Schema Types]] '''Built in Types''' Just as with types in XML schema, the XMLBeans types based on schema are arranged in a hierarchy. In general, the hierarchy of XMLBean types mirrors the hierarchy of the schema types themselves. XML schema types all inherit from xs:anyType (which is at the root of the hierarchy); XMLBeans types inherit from !XmlObject ... [[http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html|XMLBeans Support for Built-In Schema Types]]
+ '''User Derived Schema Types''' When you compile XML schema, the resulting API is made up of two categories of types: built-in types that mirror those in the schema specification and others that are generated from user-derived schema types. This topic provides an overview of the Java types generated for user-derived types, describing the methods the Java types provide ... [[http://xmlbeans.apache.org/docs/2.0.0/guide/conJavaTypesGeneratedFromUserDerived.html|Java Types Generated from User-Derived Schema Types]] '''Built in Types''' Just as with types in XML schema, the XMLBeans types based on schema are arranged in a hierarchy. In general, the hierarchy of XMLBean types mirrors the hierarchy of the schema types themselves. XML schema types all inherit from xs:anyType (which is at the root of the hierarchy); XMLBeans types inherit from !XmlObject ... [[http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html|XMLBeans Support for Built-In Schema Types]]
+
----
<<Anchor(configPackageName)>> '''Can I change the default package names for the java classes generated from my schema?'''
@@ -312, +412 @@
1. Put the JAR on your classpath
+ 1.
- 1. Use {{{com.bea.xml.XmlBeans.getContextTypeLoader()}}} to get the !SchemaTypeLoader corresponding to your thread's context classloader.
+ Use {{{com.bea.xml.XmlBeans.getContextTypeLoader()}}} to get the !SchemaTypeLoader corresponding to your thread's context classloader.
+
+ 1.
- 1. you can then use {{{schemaTypeLoader.findType(QNameForType)}}}
+ you can then use {{{schemaTypeLoader.findType(QNameForType)}}}
+
+ 1.
- 1. and then {{{type.getFullJavaName()}}}
+ and then {{{type.getFullJavaName()}}}
+
+ 1.
- 1. see this post: http://nagoya.apache.org/eyebrowse/ReadMsg?listName=xmlbeans-user@xml.apache.org&msgNo=7 ''@fixme: seems to be a dead link''
+ see this post: http://nagoya.apache.org/eyebrowse/ReadMsg?listName=xmlbeans-user@xml.apache.org&msgNo=7 ''@fixme: seems to be a dead link''
+
----
<<Anchor(schemaAnnotation)>> '''How do I get to !SchemaAnnotation and !SchemaIdentityConstraint on elements?'''
@@ -332, +440 @@
{{{<xs:complexType name="T">
+ .
- . <xs:sequence>
+ <xs:sequence>
+
+ .
- . <xs:element name="a" type="xs:string"/> <xs:choice>
+ <xs:element name="a" type="xs:string"/> <xs:choice>
+
+ .
- . <xs:element name="a" type="xs:string" maxOccurs="unbounded" tns:ann="annotation_a"/> <xs:element name="b" type="xs:string" maxOccurs="unbounded"/>
+ <xs:element name="a" type="xs:string" maxOccurs="unbounded" tns:ann="annotation_a"/> <xs:element name="b" type="xs:string" maxOccurs="unbounded"/>
+
+
</xs:choice>
+
+
</xs:sequence>
+
</xs:complexType>}}}
@@ -450, +568 @@
This [[http://xmlbeans.apache.org/docs/2.0.0/guide/conUsingBookmarksToAnnotateXML.html|document]], http://xmlbeans.apache.org/docs/2.0.0/guide/conUsingBookmarksToAnnotateXML.html, discusses using bookmarks to annotate xml. [[http://www.profi-fachuebersetzungen.de|.]]
----
- <<Anchor(schemaDependencies)>> '''External links:''' [[http://erarecoin.com/|coin collecting]] [[http://www.icybid.com/|ebay alternative]] [[http://www.silverolas.com/carlsbad/carpet-cleaning.html|Carpet cleaning carlsbad]] [[http://legalmarijuanadispensary.com/index.php?option=com_content&view=article&Itemid=118&id=1690|Los Angeles Dispensary]] [[http://www.dgapplianceservice.com/|appliance repair los angeles]] [[http://www.youtube.com/watch?v=RBYsNFmukWQ|Los Angeles Personal Injury Lawyer]] [[http://usaappliances.net/|Leading Appliance Repair Service Los Angeles]] [[http://www.darsonn-cigarette.com/|e-cigarette]] [[http://www.fragrantbodyoilz.com/|body oil]] [[http://www.microspices.com/|Gewurze, Curry, Chili]][[http://www.your-local-plumber.com/|local plumber]] [[http://www.euro-millions.cc/|Euro Millions]] [[http://www.yoga-workshops.de/|Yoga]] [[http://www.limevizio.com|mobile billboards]] [[http://www.creditcardhelp.net/|credit card help]] [[http://www.urlaubsprofis24.de/|Urlaubsprofis24]] [[http://www.flowers-los-angeles.org/|flowers los angeles]] [[http://www.stimuluswebdesign.com/|web design uae]][[http://www.tridentdentistry.com/|West Los Angeles dentist]] [[http://www.internet-seo-marketing.com|Suchmaschinenoptimierung]] [[http://www.flowerdeliverylosangeles.org/|flower delivery los angeles]] [[http://www.eamechanicalrepair.com/|Los Angeles Air Conditioning Repair]] [[http://www.ocapprepair.com/|Orange County Appliance Repair]][[http://www.losangelesapprepair.com/|Los Angeles Appliance Repair]] [[http://www.buyersofnewyork.com/|Sell Gold NY]] [[http://www.miraclerooter.com/|Los Angeles Plumbers]] [[http://www.goysinsurance.com|Los Angeles Auto Insurance Agent]] [[http://www.dial911plumbing.com/|los angeles plumbing]] [[http://www.microspices.com/|kochen on demand]] [[http://www.miraclerooter.com/|Plumber Los Angeles]] [[http://www.dubaiescort.me/|dubai escort]] [[http://www.pension-scout.de/|Pensionen Munchen]] [[http://www.melatrolreviews.info/|Link mieten]] [[http://franklangefocus.blogspot.com/|agiler Manager Frank Lange SCRUM]] [[http://www.tarifplatz.com/|Tarifvergleich]] [[http://www.handyshop48.de/|Handyshop]] [[http://www.hundeshagen.de|Rechtsanwalt Gottingen Northeim Duderstadt]] [[http://www.ehescheidung-jetzt.de|Online Scheidung]] [[http://www.partyanimalpetfood.com|organic pet food]] [[http://www.countertopnewjersey.com/|granite new jersey]] [[http://www.aquavidapools.com/|Pool Remodel]] [[https://www.moneyserverz.com|Second Life Linden Dollars]] [[http://www.torontolimo.com/|Toronto Limo]] [[http://www.crosspointechurch.co/|Churches in Fresno]] [[http://www.sieraden-online.nl/horloges/|Horloges]] [[http://overquaranta.altervista.org/|over]] [[http://www.agrapher.net/|newspaper]] [[http://www.consolidating-creditcard-debt.org|consolidating credit card debt]]
+ <<Anchor(schemaDependencies)>> '''External links:''' [[http://erarecoin.com/|coin collecting]] [[http://www.icybid.com/|ebay alternative]] [[http://www.silverolas.com/carlsbad/carpet-cleaning.html|Carpet cleaning carlsbad]] [[http://legalmarijuanadispensary.com/index.php?option=com_content&view=article&Itemid=118&id=1690|Los Angeles Dispensary]] [[http://www.dgapplianceservice.com/|appliance repair los angeles]] [[http://www.youtube.com/watch?v=RBYsNFmukWQ|Los Angeles Personal Injury Lawyer]] [[http://usaappliances.net/|Leading Appliance Repair Service Los Angeles]] [[http://www.darsonn-cigarette.com/|e-cigarette]] [[http://www.fragrantbodyoilz.com/|body oil]] [[http://www.microspices.com/|Gewurze, Curry, Chili]][[http://www.your-local-plumber.com/|local plumber]] [[http://www.euro-millions.cc/|Euro Millions]] [[http://www.yoga-workshops.de/|Yoga]] [[http://www.limevizio.com|mobile billboards]] [[http://www.creditcardhelp.net/|credit card help]] [[http://www.urlaubsprofis24.de/|Urlaubsprofis24]] [[http://www.flowers-los-angeles.org/|flowers los angeles]] [[http://www.stimuluswebdesign.com/|web design uae]][[http://www.tridentdentistry.com/|West Los Angeles dentist]] [[http://www.internet-seo-marketing.com|Suchmaschinenoptimierung]] [[http://www.flowerdeliverylosangeles.org/|flower delivery los angeles]] [[http://www.eamechanicalrepair.com/|Los Angeles Air Conditioning Repair]] [[http://www.ocapprepair.com/|Orange County Appliance Repair]][[http://www.losangelesapprepair.com/|Los Angeles Appliance Repair]] [[http://www.buyersofnewyork.com/|Sell Gold NY]] [[http://www.miraclerooter.com/|Los Angeles Plumbers]] [[http://www.goysinsurance.com|Los Angeles Auto Insurance Agent]] [[http://www.dial911plumbing.com/|los angeles plumbing]] [[http://www.microspices.com/|kochen on demand]] [[http://www.miraclerooter.com/|Plumber Los Angeles]] [[http://www.uk-fast-payday-loans.com/|guaranteed payday loans]] [[http://www.dubaiescort.me/|dubai escort]] [[http://www.pension-scout.de/|Pensionen Munchen]] [[http://www.melatrolreviews.info/|Link mieten]] [[http://franklangefocus.blogspot.com/|agiler Manager Frank Lange SCRUM]] [[http://www.tarifplatz.com/|Tarifvergleich]] [[http://www.handyshop48.de/|Handyshop]] [[http://www.hundeshagen.de|Rechtsanwalt Gottingen Northeim Duderstadt]] [[http://www.ehescheidung-jetzt.de|Online Scheidung]] [[http://www.partyanimalpetfood.com|organic pet food]] [[http://www.countertopnewjersey.com/|granite new jersey]] [[http://www.aquavidapools.com/|Pool Remodel]] [[https://www.moneyserverz.com|Second Life Linden Dollars]] [[http://www.torontolimo.com/|Toronto Limo]] [[http://www.crosspointechurch.co/|Churches in Fresno]] [[http://www.sieraden-online.nl/horloges/|Horloges]] [[http://overquaranta.altervista.org/|over]] [[http://www.agrapher.net/|newspaper]] [[http://www.consolidating-creditcard-debt.org|consolidating credit card debt]]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org