views:

18

answers:

0

I have some large XML files to load via SSIS, and need to get an ID value from the first line of files, in order to get a key value to append to the imported rows:

After this root element, there are many children (inidividual elements) which load fine. But when using an XML Task with an XPath query /sessions[1]/@accountId[1], it appears the task is attempting to parse the entire file instead of simply returning the attribute from the first element, because it runs for a long period of time, then throws an out of memory exception.

The above query tested with FirePath in Firebug runs very quickly, although it may be parsing the page in advance.

Is there a quick way to get this single value, via an XPath query or other means?

related questions