SimpleXMLD XML Parser 0.0.1

Kris foo at bar.com
Tue Oct 2 22:38:01 PDT 2007


Makes a lot of sense; thanks :)


"Brian Hsu" <brianhsu.hsu at gmail.com> wrote in message 
news:fdv00n$1hp0$1 at digitalmars.com...
> fumanchu Wrote:
>
>> Are you considering XPath query also?
>> - Kris
>
> Yes, but I'm just starting reading some XPath tutorial, so it may take an 
> while before I could implement it.
>
> And there is also a high probabilities that I would just implement a 
> subset of it instead of all operator of XPath query.
>
> For Example:
> // Access Select middle BBB element(s) :
> BBB[position() = floor(last() div 2 + 0.5) or position() = ceiling(last() 
> div 2 + 0.5) ] may not be implemented.
>
> Because currently I think the goal of SimpleXMLD is let user easily access 
> XML as a tree structure without having to much knowledge about so many 
> standard, parsing method or jargon that they do not know.
>
> So XPath in my current thought, it is just a way that user could easily 
> access nodes in XML tree structure when they are already know the 
> structure of XML tree in SimpleXMLD.
>
> They could use query like '/AAA/BBB/CCC' to access third level child and 
> //BBB to access all child named BBB instead of writing much D code to do 
> lots of tedious things like search the whole tree for nodes that are named 
> BBB.
>
> Since it is very easy when you could get all BBB node in an array and 
> calculate the middle of array index to get the middle BBB node, using 
> above XPath query will not save much computation time or memory 
> space(because all node object are already in system memory), but just an 
> overhead for library to process the query.
>
> --
> Brian Hsu 





More information about the Digitalmars-d-announce mailing list