Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Lazy DOM building

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Following up a point that got raised about DOM performance.
The Xerces-j parser says that it supports lazy DOM building by default. In this approach, practically nothing is built until you need it.

I wonder how you would handle parser errors with this approach?

However, looking at the xerces based implementation in Java 5, code that mentions the feature "http://apache.org/xml/features/dom/defer-node-expansion" seems to be frequently commented out.
When I tried setting this feature on a standard library DocumentBuilderFactory, I got an AbstractMethodError!
So it appears you would have to use a different parser than the default to get lazy DOM.

I would be interested to hear from anybody who has found a parser that actually implements this feature.
Bill
 
Well THAT's new! Comfort me, reliable tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic