[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: ***SPAM*** Representing binary trees in XML=?UTF-8?Q?=E2=

  • From: "Liam R. E. Quin" <liam@fromoldbooks.org>
  • To: "Costello, Roger L." <costello@mitre.org>, "xml-dev@l..." <xml-dev@l...>
  • Date: Thu, 04 Jul 2019 16:46:17 -0400

Re: ***SPAM***   Representing binary trees in XML=?UTF-8?Q?=E2=
On Thu, 2019-07-04 at 13:45 +0000, Costello, Roger L. wrote:

> Are there other ways to represent binary trees in XML?

Many. But it's mostly in the details; stand-off markup (flat) and
directly nested are the two most common. Note that arbitrary graph
structures can't be descried as pure trees, so you need either a hybrid
approach or (simplest) the flat/standoff approach.
 
> Of the two ways to represent binary trees shown above, which way is
> easier to process with XSLT? Which way is easier to process with
> other programming languages?

It doesn't make much difference. The id/idref approach allows for
indexed access.

> If you have used the recursive approach, have you encountered
> problems with XML parsers failing on deeply nested elements?
Years ago, yes (with SGML too).

But tail recursion, where available, usually eliminates that.

Liam



-- 
Liam Quin, https://www.delightfulcomputing.com/

Upcoming courses: DocBook (sold out)
                  CSS for XML People, DC area, USA: August



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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.