For all those who are stumbling upon this old question here:
The most comfortable way to work with IDocs and IDoc-XML, which is offered by SAP at no additional charge, is to use the SAP Java IDoc Class Library add-on for the SAP Java Connector.
It can be downloaded from the SAP Java Connector Homepage at https://support.sap.com/jco .
Unfortunately such an IDoc Class Library add-on is missing for the SAP Connector for Microsoft .NET environment - at least there is currently none offered by SAP as far as I know.
Alternatively one may also have a look and consider to use the SAP Business Connector which also offers appropriate APIs for dealing with IDocs and IDoc-XML. Of course, this is an integration platform product for exchanging business data between various systems, and no development library for being included in own Java application projects. But it is also offered free of charge to all SAP customers owning a NetWeaver license.
The prerequisite for all solutions offered by SAP is that you are an SAP customer or partner and own a license for an ABAP system.