XML string being truncated
I am new to XML and relatively new to SSIS. I am trying to load a string, containing multiple lines, to a column. Here is the piece of the XML is question. <stacktrace> <![CDATA[ at com.acmeinc.batch.BatchFileReceiver.doPollInThread(BatchFileReceiver.java:284) at com.acmeinc.batch.BatchFileReceiver$1.run(BatchFileReceiver.java:264) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) ]]> </stacktrace> here is the related xsd: <xs:element minOccurs="0" name="stacktrace" type="xs:string" /> In SSIS the External column for the XML Source is defined as DT_WSTR length 8000, but for some reason it is only loading the first 255 characters. I also tried text but I get the same result. 2 questions: how do I avoid truncation? can I load each 'line' into a different row? thanks in advance.
May 16th, 2011 9:45am

I think the issue here is in missing outer "root" element. Try adding it so the XML would look like: <root> <stacktrace> <![CDATA[ at com.acmeinc.batch.BatchFileReceiver.doPollInThread(BatchFileReceiver.java:284) at com.acmeinc.batch.BatchFileReceiver$1.run(BatchFileReceiver.java:264) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) ]]> </stacktrace> </root> Regenerate XSD.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 10:04am

my xml has a root, I just included the section in question. the other sections in my xml load fine.
May 16th, 2011 10:06am

You probably got the warning you ignored when set your XML source up as per http://blog.hoegaerden.be/2011/04/07/loading-xml-using-ssis/ Review and rectify and refresh the metatada.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 11:21am

could you put your xml file here? also if you have DTD or XSD schema put it too. I will check and let you know .http://www.rad.pasfu.com
May 16th, 2011 12:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics