October 6, 2008 at 9:08 am
Hello,
I am currently experiencing a problem with XML Source and the way it is handling our XML files. It seems to be ignoring the CompanyId and CustomerId elements. If I move the children of PurchaseOrderNotificationDetails into the same parent of CompanyId and CustomerId, and remove the PurchaseOrderNotificationDetails parent, it will work. However I don't want to have to spend much time manipulating the XML.
Has anyone else had problems with this or know how to resolve the problem?
Many thanks,
Ashley.
October 6, 2008 at 9:25 am
October 6, 2008 at 9:35 am
Thanks Tom for your reply.
I have attached the XSD that was generated from within the XML Source Editor. Could you please elaborate on what you mean about the whitespace? I wouldn't have thought it would cause a problem?
October 7, 2008 at 3:12 am
October 7, 2008 at 3:26 am
Sorry, it seems the elements get converted to whitespace after I psot the reply.
The elements that get ignored are CompanyId and CustomerId, so the only elements that seem to be parsed are the children of PurchaseOrderNotificationDetails.
Regards.
October 7, 2008 at 3:48 am
from MSDN:
The XML source generates tabular structures from the XML data by creating an output for every element that contains other elements in the XML files
As your company and customer ID elements don't contain any elements of their own, then an output for them will not be created.
If you put them in a wrapper element (see attachments), then two outputs will be created.
Tom
October 7, 2008 at 4:04 am
Thank you Tom for your example, however this did not resolve the problem. Are there any settings or options that I should have enabled/disabled?
October 8, 2008 at 2:44 am
October 8, 2008 at 3:59 am
Hello Tom,
I was in the process of taking screenshots to show you what the outputs were, and then I noticed a second output connection (green one), so I figured that there is an output connection for each node of the XML file. I then used a 'Union All' task to connect all the columns together so it could be inserted into the database.
However, the only problem with is that because these XMLs are coming in from another destination, we cannot modify them, therefore we cannot add the IDs node and I would need to use a stylesheet to create the node around the CompanyId and CustomerId. Once the stylesheet is created and used with the 'XML Task', would this work?
I'll need to have a look around for some stylesheet tutorials.
Many thanks.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply