stringList inside Document is not getting Aligned as per DT

Hi All,
I need some help with solving the below scenario.

I have the below document(Idata in my pipeline)

employeeDataDT(Document) which has below strings and stringLists
workBranch (string)
City (string)
employeeName (stringList)
employeeAge (stringList)
employeeRole (stringList)

then when I use pub.xml:documentToXMLString to convert the idata to XML String, I am seeing elements inside stringList coming together.
ForExample:- like below

<?xml version="1.0"?> Chennai MAA emp1 emp2 1 2 Dev1 Dev2

But I want it to be coming as in the DT structure.

For Example:- like below

<?xml version="1.0"?> Chennai MAA


I tried with giving and without giving my DT (employeeDataDT) as input to- documentTypeName of service documentToXMLString.

but both gives me as output.

Any help here is appreciated. Thank you!

Hello Pradeep,

I belive you are seeing the output that way because the IDATA structure you had created may not work as per your given example

OK try this way and rebuild the IDATA structure per outlined xml hierarchy below:

– workBranch (string)
– City (string)
– employeeDetails (Doc list) will be the child loop as it repeats for each employee (0-n) times.
-----employeeName (string)
-----employeeAge (string)
-----employeeRole (string)

Having said that with the above structure based on your revised mapping the example should output like:

<?xml version="1.0"?> Chennai MAA [b] [/b] emp1 1 Dev1 [b][/b]


---- so on

Give it a shot and let us know the updated results!


1 Like

Thanks a lot for looking into it and giving a suggestion. I too thought of it and have tried implementing solution as you suggested.

But as you rightly said, it will add extra tag as below.

But since I am working for migration project, I should not have that extra tag coming, as it is not there in the existing output-xml from smalltalk code.

<?xml version="1.0"?> Chennai MAA [b][/b] emp1 1 Dev1 [b][/b] emp1 1 Dev1 ---- so on

I thought we can parse and remove that particular tag in xml. but Since I was not so sure about the parse and remove logic implementation, I posted to get some suggestion/help.

Please suggest me, if some way is there to solve this.

Thanks & Regards,
Pradeep N

Hi Pradeep,

I might be wrong, but you will have to add the extrag tag at least temporary during your processing as otherwise wM will group all elements of a list together in the XML as you have already noticed.

Can you explain a bit more on your migration project?
From above information it is a smalltalk -> wM migration, right?



It would be a tough call unless you add that extra Tag in the structure and if not another rude way is once you get xmldata string (that has with employeeDetails) you can then invoke another flow step for pub.string:replace (map the xmldata) and replace those tags and with new line spaces that might look alike similar to your small talk outputs -->

Hope this will give some work around solution on this issue.