Convert Xsd To Java Pojo Online -

@XmlElement(required = true) protected String name;

@XmlAttribute(name = "active") protected Boolean active; convert xsd to java pojo online

package com.example.model; import javax.xml.bind.annotation.*; @XmlElement(required = true) protected String name

Run xjc locally or via build tool to keep code generation in your pipeline and avoid uploading sensitive schemas. @XmlAttribute(name = "active") protected Boolean active

@XmlElement(required = false) protected Double salary;

<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Employee"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:int"/> <xs:element name="name" type="xs:string"/> <xs:element name="salary" type="xs:double" minOccurs="0"/> <xs:element name="department" type="xs:string"/> </xs:sequence> <xs:attribute name="active" type="xs:boolean"/> </xs:complexType> </xs:element> </xs:schema>