Page 1 of 1

XML Output Stage - Combine Attributes

Posted: Wed Oct 30, 2013 6:49 am
by sohasaid
Hi,

I can't generate XML file with the below format.

Code: Select all

  <ns2:SyncRec>
    <ns2:SyncInfo>
      <ns2:Details>
        <ns2:Rec>
          <bas:Id>
TEST
          </bas:Id>
        </ns2:Rec>
      </ns2:Details>
    </ns2:SyncInfo>
  </ns2:SyncRec>
</SyncGetRsType>

  <ns2:SyncRec>
    <ns2:SyncInfo>
      <ns2:Details>
        <ns2:Rec>
          <bas:Id>
TEST
          </bas:Id>
        </ns2:Rec>
      </ns2:Details>
    </ns2:SyncInfo>
  </ns2:SyncRec>
</SyncGetRsType>
Input is one column dataset:
----------------------------
ID
--
TEST
TEST


The best I can get from the XML output stage is the following:

Code: Select all

  <ns2:SyncRec>
    <ns2:SyncInfo>
      <ns2:Details>
        <ns2:Rec>
          <bas:Id>
TEST
          </bas:Id>
          <bas:Id>
TEST
          </bas:Id>
        </ns2:Rec>
      </ns2:Details>
    </ns2:SyncInfo>
  </ns2:SyncRec>
</SyncGetRsType>
Description in clumn definition is:
/SyncGetRsType/ns2:SyncRec/ns2:SyncInfo/ns2:Details/ns2:Rec/bas:Id/text()

As you can see, it combines some attributes but the requirements need all attributes to be there at every single line.

Appreciate your support.

Posted: Wed Oct 30, 2013 9:43 am
by eostic
is this a quick test? ..will the real example have valid and unique identifiers for all of the higher level nodes?

If so, it's likely that this data is not really valid for test purposes. You may need to have something that identifies more uniqueness for each of the nodes along the way...and that may exist in your real-life data set.

If not, you may need to create some counters that provide uniqueness and include them in the xml, but again, it depends on the nature of your input data.

Another thought for quick testing is to avoid the "aggregate" check box in the Transformation settings on the output link of your xmlOutput job.

Ernie