OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] An elegant implementation of an XML graph traversal

Richard Salz wrote:

>> Recall that, while an XML document is sometimes a tree, in the 
>> general case it is a graph. And that graph may have loops.
> Could you post an example of this?  I've never seen an XML document with loops.

In the following document Section A points to Section B and Section C. Section B points to Section D. Section C points to Section D. Section D points to Section A. 

Thus, the XML document is a graph and it consists of two loops (cycles): A -> B -> D -> A and A -> C -> D -> A

    <Section id="A">
        <Include idref="B" />
        <Include idref="C" />
    <Section id="B">
        <Include idref="D" />
    <Section id="C">
        <Include idref="D" />
    <Section id="D">
        <Include idref="A" />
    <Section id="E" />


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS