DOM verses VB
At a company I am working at the discussion came up if there is a performance problem or resource problem using DOM to write a XML document verses using VB Script. One side says if the XML document is simple then just use VB another side says since DOM is a compiled object than it is better to use and should not use any more resources than having VB run inside an object. Has anyone run a test or knows?
Also some feel the VB is simplier to use and would use less code than using DOM...anyone want to comment?
Thanks
# 1 Re: DOM verses VB
No definate answers, but a few comments;
- If performance is such an issue for you, why are you using VB Script? If performance isn't a (big) issue, go for ease of development.
- Number of lines of code isn't a good measure of code quality.
- If you use VB Script to write out the XML file, then you are forced to do so in the natural order of the document, remembering to close of the tags later. If you use the DOM, you get "random access" to the document and the closing tags always end up in the write place.
- Good luck supporting diferent character encodings from VBScript. (Maybe theres a simple way to output UTF-8 from VBScript, but it doesn't spring to mind)
NickH
NickH at 2007-11-10 3:39:50 >
