Re: [Libxmlplusplus-general] Attribute inherting from Node



Murray Cumming wrote:
On Tue, 2003-02-04 at 08:21, Stefan Seefeld wrote:

* make 'Attribute' a subclass of 'Node'


I know that the DOM spec does this. Why is it a good idea?

If you use xpath lookup, you get a list of nodes returned.
Attributes can be part of that list, for example with a
pattern such as '//chapter/@id' returning a list of chapter
ids.

(see my new example examples/dom/example, which does exactly
that: it looks for 'linkend' attributes and tries to resolve
them)

So, Attributes need to be Nodes for this to work.

Stefan








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