XML to IData conversion

Hi,

I have some problem to identifying the documentList,when i want to convert xml file to Idata converions format for the follwoing scnearion:-

xml look like:-

I would like to set all parent

as a doucmentList,and child
tag shuld be as a document. So in above case it should be something like
DocumentList
Document
DocumentList
Document.

But we are getting first

as documentType remaining treated as document (including other parent tag).

For your reference i have attach the following code for XML to IData converions.

Vedant
getIdata.txt (6.24 KB)

Is this code for an IS client that is connecting to IS? Or is it a Java service within IS?

If the latter, this is a classic example of when a Java service should not be used. Parsing an XML string into an IS document (IData structure internally) is the core capability of IS and FLOW.

The first bit of code looks off. It creates an IData var named pipeline and then tries to read variables out of it–those vars will never exist.

Since this is custom code, then you’ll need to make adjustments to determine which level “Details” you’re currently processing to create a document or a document list as desired. Assuming you’re invoking a service on IS which accepts or returns this structure, you may be able to use the the Tools | Generate Code… to create code for invoking the service from a client. That code can guide you on creating the document and document lists as desired.