Page 1 of 1

XML Formatting Issues

Posted: Thu Jul 15, 2010 9:05 am
by koolsun85
As discussed in best practices document, I am merging all the child nodes with parent node.

But, here are the issues I have.

1.I get this " <?xml version="1.0" encoding="UTF-8"?>" repeated in every field.

2. The XML Header Tag is not correct, the XML is enbedded with in XML as shown below

<?xml version="1.0" encoding="UTF-8"?><MATERIAL xmlns:defns="http://abc.com/schema/material><?xml version="1.0" encoding="UTF-8"?>


Any thoughts of what I might be missing.

Posted: Thu Jul 15, 2010 9:16 am
by chulett
Hmmm... did you generate all of the 'child' bits as chunks? They shouldn't have anything header-wise before the final merge.

Posted: Thu Jul 15, 2010 9:40 am
by koolsun85
I did exactly as defined in the document.
No chunks were selected in the XML Output stage Document Settings for all the individual stages, but at the final Output, I had it and included the needed namespace.

Lets say, here is what I did.

For all the children XMLs, the definition is
Input
/CHILD1/FIELD1/text()

Output
/


Likewise
Input
/CHILD5/FIELD1/text()

Output
/

and at the end for final XML
/PARENT/FIELD1/text()
/PARENT/FIELD2/text()
/PARENT/text() ---since this is brought in as entire child1 file onto single field.
/PARENT/text() ---since this is brought in as entire child2 file onto single field.

Posted: Thu Jul 15, 2010 10:46 am
by eostic
Check what Craig notes above....go back to all of your "upstream" xmlOutput Stage....find the "generate chunk" check box...... it looks like you are putting headers in the chunks as you create them.......

...and do some debugging...send the partial chunks to a file or peek so you can review them to be sure they are being created correctly.

Ernie

Posted: Thu Jul 15, 2010 11:08 am
by koolsun85
Thanks for the guidance.

I verified the individual files and they are creating the following for every sub xml file?

<?xml version="1.0" encoding="UTF-8"?>

I verified everything in document setting of output tab for every sub xml stage and none of them is checked, comment, header, namespace likewise everything.

Posted: Thu Jul 15, 2010 11:56 am
by eostic
Check what Craig notes above....go back to all of your "upstream" xmlOutput Stage....find the "generate chunk" check box...... it looks like you are putting headers in the chunks as you create them.......

...and do some debugging...send the partial chunks to a file or peek so you can review them to be sure they are being created correctly.

Ernie