AW: WG: [xml] WG: Document traversing interface for libxml2



I still have a fundamental question left which is:
   - shouldn't it be better from an API and implementation 
point of view
     to instead make the xmlDocWalker a "subclass" of the xmlReader,
     basically creating an xmlTextReader from an xmlDocPtr, 
adding the 
     options to go forward and backward in that case and reuse most of
     the code from the xmlTextReader to reimplement the xmlDocWalker
     in just a slightly different way
     pros:
        - share code
      - less APIs entry points
I find this idea very attractive. You could go even further and give the xmlTextReader a callback function, 
say xmlGetNextElement, used internally by xmlTextReaderRead so that one can, just by using another 
xmlGetNextElement, process virtually any kind of input data (XML/HTML files, DOM trees, config files, 
in-memory structured data,...).






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]