JAXB perguntas e respostas de entrevista
Question: How to generate Java from XML Schema?Answer: • From command-line– Windows: %JAXB_HOME%binxjc cars.xsd – UNIX: %JAXB_HOME%/bin/xjc.sh cars.xsd – these write generated files to current directory • From Ant Generated Files: • com/withoutbook/cars directory – Car.java • interface representing the “car” complex type • only describes get and set methods for car properties – Cars.java • interface representing “cars” global element • extends CarsType and javax.xml.bind.Element (just a marker interface) • describes no additional methods – CarsType.java • interface representing anonymous complex type defined inside the “cars” global element • provides method to get collection of Car objects (as a java.util.List) – ObjectFactory.java • class used to create objects of the above interface types • extends DefaultJAXBContextImpl which extends JAXBContext – bgm.ser • a serialized object of type com.sun.msv.grammar.trex.TREXGrammar • can’t find any documentation on this - don’t know its purpose – jaxb.properties • sets a property that defines the class used to create JAXBContext objects |
Salvar para revisao
Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.
Faca login para salvar favoritos, perguntas dificeis e conjuntos de revisao.
Isto e util? Sim Nao
Mais uteis segundo os usuarios:
- What Is XML Binding?
- What is XML Binding Relationships?
- Please explain JAXB Use Cases.
- Why Use XML Binding?
- What are the goals of JAXB?