Leagis
Leagis

Reputation: 175

SelectNodes .length returns 0

so I'm in big trouble atm: I parse a XML-File, and for that I'll want to count all entrys. My code works well, but I tested it with a very big XML-File and nothing happend. So I tried to figure out, where the error is.

Dim nodeCount : nodeCount = oXML.SelectNodes("/root/abc/*").length    

This works for XML-Files up to 6.000 Entrys(Around 40k-Lines of Code), but If the number is bigger, it returns 0. So I have no idea, how to fix this.

Upvotes: 1

Views: 2425

Answers (1)

Malachi
Malachi

Reputation: 3221

in VBScript the largest Variable that you get for text is a string and it will only hold about 2 billion characters.

VBScript Data Types

after the variable (oXML) runs out of space it just cuts off and with out the closing tags the xpath won't query correctly and will not return any data.

Have you tried to write the code in Regular VB, you would have bigger variable types? is that even an option?

Upvotes: 1

Related Questions