Hi,
I am using XML output stage to generate an xml file. I am able to generate the xml file also but the issue is with the structure of the xml file.
Below are a sample records for which the xml file was generated.
1) "100256","Dsm","410","E","A"
2) "100257","Dsm","410","E","A"
3) "100260","Dsm Ii","412","E","A"
The sample of the xml generated was like given below.If you see the xml generated it shows that it has clubbed together the tags for the code 100256 and 100257, Is is probably because they have all of there other associated values same. Please help me out with this issue as I want it to generate seperate xml tags for both of them like the one created for code 100260.
<ns1:updateRequest>
<ns1:jobList>
<ns1:job>
<ns1:code>100256</ns1:code>
<ns1:code>100257</ns1:code>
<ns1:description>Dsm</ns1:description>
<ns1:salaryPayGrade>410</ns1:salaryPayGrade>
<ns1:flsaStatus>E</ns1:flsaStatus>
<ns1:effectiveStatus>A</ns1:effectiveStatus>
</ns1:job>
<ns1:job>
<ns1:code>100260</ns1:code>
<ns1:description>Dsm Ii</ns1:description>
<ns1:salaryPayGrade>412</ns1:salaryPayGrade>
<ns1:flsaStatus>E</ns1:flsaStatus>
<ns1:effectiveStatus>A</ns1:effectiveStatus>
</ns1:job>
</ns1:jobList>
</ns1:updateRequest>
Duplicates issue in XML OUTPUT STAGE to generate xml
Moderators: chulett, rschirm, roy
A strange issue indeed. I've found that the easiest way to alleviate this is to ensure that the sub-elements cannot be the same. Add another element as an immediate sub-node and then edit it out afterwards in a downsteam transformer, by sending your output to a single column on the output link...a varchar with large length and just a single "/" in the Description property.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
...there are lots of great string functions in a BASIC Transformer, or...just do the whole Job in a Server Job instead and use a regular transformer....I'd have to see your actual resulting string, but I'll be that a couple of nested ereplace()'s would work just fine.....
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
I assume you have xpaths defined for each of these columns? Please can you post them? Including named spaces (NS1:) in your output can be tricky, so you have to be pretty specific at what you're trying to achieve. Setting your "code" column as the repeating group column should resolve your grouping problem.
Try generating your data using XPATH without names spaces e.g
/updateRequest/jobList/job/code
/updateRequest/jobList/job/code/description
etc.
Once you have this working, attempt a version 2 to solve your named space issue.
Try generating your data using XPATH without names spaces e.g
/updateRequest/jobList/job/code
/updateRequest/jobList/job/code/description
etc.
Once you have this working, attempt a version 2 to solve your named space issue.
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.