Skip to content

Commit

Permalink
adding images and a tree example
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Dec 30, 2009
1 parent fbc7d82 commit 24b68b6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Binary file added html_tree.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions nokogiri.markdown
Expand Up @@ -97,6 +97,25 @@ but you should choose the one that is most convenient.

### Data structures

To become data extraction Zen Masters, we first need to understand the data
structure returned by Nokogiri. Nokogiri converts HTML and XML documents in
to a tree data structure.

For example, an HTML document that looks like this:

<html>
<head>
<title>Hello!</title>
</head>
<body id="uniq">
<h1>Hello World!</h1>
</body>
</html>

will be represented in memory with a tree that looks like this:

![HTML Tree](html_tree.png)

## Data Extraction

### Basic XPath
Expand Down

0 comments on commit 24b68b6

Please sign in to comment.