There are one, two or three DBDocument nodes inside a DBPart node
My thinking at the moment is that the approach of the xsl is wrong and it should use templates more, but I have very little experience with this stuff and am trying to get my head around how xsl templates work. I assume that I need to get the DBDocument information first,and then go back and fill in the rest. I just don't know how to do that.
OK, here is a simplified version of the input xml.
I have removed data from nodes I am not interested in, but left the nodes so you can get a feel for the structure.
There are two records (DBFile nodes) here - the first one has a single file, the second has two files (i.e. 2 DBDocument nodes).
Person 2 should end up with two records - one for File 2 and one for File 3.
I have a very large XMLDocument with 56,000 child records each having 8 child field elements. The application that i have written performs a complicated process on the XML. It can process 10,000 records in 5 minutes and 20,000 in 25 minutes (increases exponentially) but takes maybe 10 hours to process the 56,000 record (which is unacceptable). Whats the best way to de-batch this XML Document into bite size chunks (eg 10,000 and after 5 iteration will process 50,000. which will execute in 25-30 minutes processing time)
How many megabytes is your xml file?
Does the "complicated process" operate on
only one of the 56,000 children independantly,
without refferencing the other children ?
Show me a childNode and tell me about
this "complicated process".
How much free memory does your computer have available ?
There is a sample of the child record. And there are 56,000 of them in the xml document. I can realy give you the full details of what the complicated process is doing but part of it is using the Muenchian Method grouping on 'cost_centre' and 'expense_code'.
The app is runningon a dev box 2.50GH, 2GB.
It has 1/2GB free when app is not running
I am working on a project for a State Agency where the data is received from multiple private entities and loaded into SQL 2005 tables. The XML schema was designed and published before my involvement with the project and now it cannot be changed. One of the elements to receive (Charges) occurs multiple times within a client but each is for a different concept. Instead of using an attribute to identify the reason for the Charge, they used the element name to do it. For example:
<FERTILIZER_CHARGE>2300</FERTILIZER_CHARGE> -- 20 different charge types identified
<CHARGE TYPE=”FERTILIZER” AMOUNT=”2300” />
I need to move all the charges to a single table and identify each one with its type but cannot find any examples where the element name is used to update a column in a table. PLEASE HELP!!!
Here's a short C# program that will read the bit of XML you want and write it to the console.
static void Main(string args)
// The XML file is specified as the first command line argument
// imagePath will contain the image path contained in the XML file
string imagePath = new XPathDocument(new StreamReader(args)).CreateNavigator().SelectSingleNode("/image/img").Value;
I've used XPath to navigate to the required element in the XML file (that's the .SelectSingleNode("/image/img") bit) and read the text there (the .Value bit). Simples.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p