![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | ![]() | ![]() | |||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]()
|
General How do I set the encoding? Why is my 'get' method called twice? Introspection Can private methods be introspected? Mapping My mapping file seems to have no effect! Are there any tools to automatically create a mapping file? Source Code Generator Can I use a DTD with the source generator? My XML output looks incorrect, what could be wrong? How can I make the generated source code more JDO friendly? Miscellaneous Is there a way to automatically create an XML Schema from an XML instance? GeneralHow do I set the encoding? Create a new instance of the Marshaller class and use the setEncoding method. You'll also need to make sure the encoding for the Writer is set properly as well: Why is my 'get' method called twice?The get method will be called a second time during the validation process. To prevent this from happening simply disable validation on the Marshaller or Unmarshaller. IntrospectionCan private methods be introspected?Castor does not currently support introspection of private methods. Please make sure proper public accesssor methods are available for all fields that you wish to be handled by the Marshalling Framework. MappingMy mapping file seems to have no effect!Make sure you are not using one of the static methods on the Marshaller/Unmarshaller. Any configuration changes that you make to the Marshaller or Unmarshaller are not available from the static methods. Are there any tools to automatically create a mapping file?Yes! We provide one such tool, see org.exolab.castor.tools.MappingTool. There are some 3rd party tools as well. Source Code GeneratorCan I use a DTD with the source generator?Not directly, however you can convert your DTD to an XML Schema fairly easily. We provide a tool (org.exolab.castor.xml.dtd.Converter) to do this. You can also use any number of 3rd-party tools such as XML Spy or XML Authority. My XML output looks incorrect, what could be wrong?Are the generated class descriptors compiled? Make sure they get compiled along with the source code for the object model. How can I make the generated source code more JDO friendly?For Castor 0.9.4 and above: Castor JDO requires a reference to the actual collection to be returned from the get-method. By default the source generator does not provide such a method. To enable such methods to be created, simple add the following line to your castorbuilder.properties file: Your mapping file will also need to be updated to include the proper set/get method names. MiscellaneousIs there a way to automatically create an XML Schema from an XML instance?Yes! We provide such a tool. Please see org.exolab.castor.xml.schema.util.XMLInstance2Schema. It's not 100% perfect, but it does a reasonable job. | ||||||||||||||||||||||||||||||||||||||||||||||||||
![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |