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

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re^2: What does this comment mean (Are DTDs of any use to XML::Parser?)
by choroba (Cardinal) on May 03, 2018 at 13:19 UTC
    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,
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: What does this comment mean (Are DTDs of any use to XML::Parser?)
by Anonymous Monk on May 03, 2018 at 13:19 UTC
    Why bother posting any of this, it adds nothing to a discussion.