in reply to Re: What does this comment mean (Are DTDs of any use to XML::Parser?)
in thread What does this comment mean (Are DTDs of any use to XML::Parser?)

DTD (or any other schema-like information) can be used to generate code to handle the conforming instances directly. Instead of looking into the schema for each element, the code already knows what element to expect, so it's definitely faster.

For an example, see Treex::PML where we used the same technique for a PML-schema.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
  • Comment on Re^2: What does this comment mean (Are DTDs of any use to XML::Parser?)
  • Download Code

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.