Package com.skaringa.javaxml.handler

Examples of com.skaringa.javaxml.handler.AttrImpl


  public void writeXMLTypeDefinition(Class type, Map propertyMap,
      DocumentOutputHandlerInterface output) throws SerializerException {

    if (getXMLTypeName().equals("char")) {
      // define char (which is not in xsd...
      AttrImpl attr = new AttrImpl();
      attr.addAttribute("name", "char");
      output.startElement("xsd:simpleType", attr);

      attr = new AttrImpl();
      attr.addAttribute("base", "xsd:string");
      output.startElement("xsd:restriction", attr);

      attr = new AttrImpl();
      attr.addAttribute("value", "1");
      output.startElement("xsd:length", attr);
      output.endElement("xsd:length");

      output.endElement("xsd:restriction");
View Full Code Here


    Class type,
    Map propertyMap,
    DocumentOutputHandlerInterface output)
    throws SerializerException {

    AttrImpl attrs = new AttrImpl();
    attrs.addAttribute("name", getXMLTypeName());
    output.startElement("xsd:complexType", attrs);

    output.startElement("xsd:sequence");

    attrs = new AttrImpl();
    attrs.addAttribute("name", "key");
    attrs.addAttribute("type", "xsd:anyType");
    attrs.addAttribute("nillable", "true");
    output.startElement("xsd:element", attrs);
    output.endElement("xsd:element");

    attrs = new AttrImpl();
    attrs.addAttribute("name", "value");
    attrs.addAttribute("type", "xsd:anyType");
    attrs.addAttribute("nillable", "true");
    output.startElement("xsd:element", attrs);
    output.endElement("xsd:element");

    output.endElement("xsd:sequence");
View Full Code Here

TOP

Related Classes of com.skaringa.javaxml.handler.AttrImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.