Skip to content
Browse files

adding images and a tree example

  • Loading branch information...
1 parent fbc7d82 commit 24b68b6fac6ee2b903250d8797e6d0e7d99fa7f2 @tenderlove committed Dec 30, 2009
Showing with 19 additions and 0 deletions.
  1. BIN html_tree.png
  2. +19 −0 nokogiri.markdown
View
BIN html_tree.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
19 nokogiri.markdown
@@ -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

0 comments on commit 24b68b6

Please sign in to comment.
Something went wrong with that request. Please try again.