Personal notes on Java
For other technologies like HTML, CSS, .NET, PHP, etc. check my other blog

Introduction

Check my other blog for an introduction to XML technologies like:
  • XSTL: Version 1.0 and 2.0 (version 2.0 has many new features like grouping elements. Has of 2012, version 2.0 is not directly supported by any browser, but there are some processors available).

Usefull tools

  • xjc
    Included in the jdk (at least since version 6) this tool lets you generate annotated java classes from a XSD (XML Schema). Resides in the folder %JAVAHOME%/bin.
    xjc.exe -p mypackage myxsd.xsd
    This is called Binding: Binding a schema means generating a set of Java classes that represents the schema. All JAXB implementations provide a tool called a binding compiler to bind a schema (the way the binding compiler is invoked can be implementation-specific).
    xjc.sh -p test.jaxb books.xsd -d work
  • schemagen
    Included in the jdk (at least since version 6) this tool lets you generate a XSD (XML Schema) from annotated java classes and beans. Resides in the folder %JAVAHOME%/bin.
    Example of usage:
    chemagen.exe Foo.java

    More details here: Using JAXB schemagen tooling to generate an XML schema file from a Java class
  • Trang
    Thrid party tool lets you generate XSD (XML Schema) from XML docs: with this tool we can generate XSD (and others) from example XML documents that exhibit all the various possibilities that may be in the schema.
    Its a free open-source tool available has a jar file (trang.jar) so you can call it from a command line like this:
    java -jar trang.jar -I xml -O xsd myXml.xml myXsd.xsd
  • NetBeans (7.0.1) Has An XML Schema Editor!
  • Use Netbeans to Create Sample XML from XSD
  • Online Schema Validator: Cut and paste your XML document and XSD Schema into the text boxes below and click the Validate! button. The results of the validation will be displayed in the status area.




Sem comentários:

Enviar um comentário