I have an application that import data from xml file into SQL Server.
Process involve complex transformations so I cannot use bulk insert or XMLSQL
Instead I open file as MSXML2.DOMDocument40 and loop through all elements.
Now I need to display progress bar while importing.
As Max value I'll take Len(xmlDoc.xml)
Then I tried to compute already processed part as
mlBytesProcessed = mlBytesProcessed + Len(objNodeList.Item(i).xml)
But this approach works only on highest level of elements.
I want to get this info from each child element.