我下面有xml数据,并且该数据包含<!--Optional:-->
和<!--Zero or more repetitions:-->
等注释。我想使用Java将此xml转换为json,我希望xml中的注释也应出现在json。谁能帮助我提供任何库或某些代码段。
<bsvc:Put_Supplier_Category_Request bsvc:Add_Only="false" bsvc:version="string"
xmlns:bsvc="urn:com.workday/bsvc">
<!--Optional:-->
<bsvc:Supplier_Category_Reference bsvc:Descriptor="string">
<!--Zero or more repetitions:-->
<bsvc:ID bsvc:type="string">string</bsvc:ID>
</bsvc:Supplier_Category_Reference>
<bsvc:Supplier_Category_Data>
<!--Optional:-->
<bsvc:Supplier_Category_ID>string</bsvc:Supplier_Category_ID>
<bsvc:Supplier_Category_Name>string</bsvc:Supplier_Category_Name>
</bsvc:Supplier_Category_Data>
</bsvc:Put_Supplier_Category_Request>