Tag Archives: tree

Parsing (X)HTML into a DOM tree in C#

As a quick alternative to the Html Agility Pack, HTML can be parsed into a DOM tree using the built-in XmlDocument class. The following snippets illustrate HTML parsing in C#.

Posted in C# | Also tagged , , , , , , , , , | Leave a comment

(C++) [CISP 430] Binary Search Tree

Binary Search Tree (BST) implementation in C++

Posted in C++ | Also tagged , , , , , , | Leave a comment

Binary Search Trees (BSTs) in C#

A Binary Search Tree (also known as a BST) is a data structure that contains ordered nodes. Each node contains an element, a left node and a right node. The nodes on the left are all nodes that contain values lower than the element and the nodes on the right contain values higher than the [...]

Posted in C# | Also tagged , , , , , , , , , , , , , | 3 Comments

XPath queries in PHP

XPath is a query language for selecting XML nodes. Suppose that you have a collection of companies represented in an XML document.

Posted in PHP | Also tagged , , , , , , , , | Leave a comment

Parsing XML in C#

This example parses an XML file with a collection of books into a DOM tree using a console application.

Posted in C# | Also tagged , , , , , , , | 1 Comment

Parsing XML in Java

There are several methods available for parsing an XML file. Some parsers transform the XML file into a traversable DOM tree. The tree consists of a root node and one or more child nodes belonging to the root node. These child nodes are able have child nodes of their own and so forth. Nodes without children [...]

Posted in Java | Also tagged , , , , , , , | Leave a comment