Tenho que fazer um xml (formato abaixo) entretanto para facilitar estava querendo fazer uma classe e depois fazer a conversão para XML de forma automática.
Ja faço isso utilizado o JAXB entretanto utilizei o wsImport para criar as classes de acordo com o webService. Nesse novo projeto não tem webservices, tenho que apenas criar o xml de acordo com o padrão.
Pontos importantes
1: Como criar a classe e a conversão em XML
2: Não entendi esse padrão do XML (metadata, fields, rowData) todos que utilizei não tem esse padrão.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<DATAPACKET Version="2.0">
<METADATA>
<FIELDS>
<FIELD attrname="Operacao" fieldtype="string" WIDTH="1" />
<FIELD attrname="PatientsName" fieldtype="string" WIDTH="255" />
<FIELD attrname="PatientId" fieldtype="string" WIDTH="64" />
<FIELD attrname="PatientsBirthDate" fieldtype="string" WIDTH="8" />
<FIELD attrname="PatientsSex" fieldtype="string" WIDTH="4" />
<FIELD attrname="PatientsWeight" fieldtype="string" WIDTH="16" />
<FIELD attrname="PatientState" fieldtype="string" WIDTH="64" />
<FIELD attrname="PatientTransportArrangements" fieldtype="string" WIDTH="64" />
</FIELDS>
<PARAMS CHANGE_LOG="1 0 4" />
</METADATA>
<ROWDATA>
<ROW RowState="4" Operacao="I" PatientsName="MAURICIO VICENTE BOAVA" PatientId="55298" PatientsBirthDate="20070123" PatientsSex="M" PatientsWeight="" PatientState="" PatientTransportArrangements="" />
</ROWDATA>
</DATAPACKET>