X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README.pod;h=29e6d4715813af545cfa6cf3bf07a498318a4f9b;hb=aeae951287c7fa77c0ce5acb7e83b8199ab87862;hp=770409fda241bc1f2a8dd0abdcddc0f6fad6023e;hpb=2d9f516571abb22d42ea26ffaf07bda8a29314f0;p=catagits%2FDOM-Tiny.git
diff --git a/README.pod b/README.pod
index 770409f..29e6d47 100644
--- a/README.pod
+++ b/README.pod
@@ -77,8 +77,8 @@ names are lowercased and selectors need to be lowercase as well.
my $dom = DOM::Tiny->new('
Hi!
');
say $dom->at('p[id]')->text;
-If XML processing instructions are found, the parser will automatically switch
-into XML mode and everything becomes case-sensitive.
+If an XML declaration is found, the parser will automatically switch into XML
+mode and everything becomes case-sensitive.
# XML semantics
my $dom = DOM::Tiny->new('
Hi!
');
@@ -427,8 +427,8 @@ node's content.
my $result = $dom->at('div ~ p');
Find first descendant element of this element matching the CSS selector and
-return it as a L object or return C if none could be found.
-All selectors listed in L"SELECTORS"> are supported.
+return it as a L object, or C if none could be found. All
+selectors listed in L"SELECTORS"> are supported.
# Find first element with "svg" namespace definition
my $namespace = $dom->at('[xmlns\:svg]')->{'xmlns:svg'};
@@ -584,7 +584,7 @@ L"SELECTORS"> are supported.
my $namespace = $dom->namespace;
-Find this element's namespace or return C if none could be found.
+Find this element's namespace, or return C if none could be found.
# Find namespace for an element with namespace prefix
my $namespace = $dom->at('svg > svg\:circle')->namespace;
@@ -596,8 +596,8 @@ Find this element's namespace or return C if none could be found.
my $sibling = $dom->next;
-Return L object for next sibling element or C if there are no
-more siblings.
+Return L object for next sibling element, or C if there are
+no more siblings.
# "
123
"
$dom->parse('
Test
123
')->at('h1')->next;
@@ -606,7 +606,7 @@ more siblings.
my $sibling = $dom->next_node;
-Return L object for next sibling node or C if there are no
+Return L object for next sibling node, or C if there are no
more siblings.
# "456"
@@ -621,8 +621,11 @@ more siblings.
my $parent = $dom->parent;
-Return L object for parent of this node or C if this node has
-no parent.
+Return L object for parent of this node, or C if this node
+has no parent.
+
+ # "Test"
+ $dom->parse('
Test
')->at('i')->parent;
=head2 parse
@@ -631,7 +634,7 @@ no parent.
Parse HTML/XML fragment.
# Parse XML
- my $dom = DOM::Tiny->new->xml(1)->parse($xml);
+ my $dom = DOM::Tiny->new->xml(1)->parse('I ⥠DOM::Tiny!');
=head2 preceding
@@ -691,7 +694,7 @@ node's content.
my $sibling = $dom->previous;
-Return L object for previous sibling element or C if there
+Return L object for previous sibling element, or C if there
are no more siblings.
# "
Test
"
@@ -701,7 +704,7 @@ are no more siblings.
my $sibling = $dom->previous_node;
-Return L object for previous sibling node or C if there are
+Return L object for previous sibling node, or C if there are
no more siblings.
# "123"
@@ -837,10 +840,10 @@ C, C or C.
my $value = $dom->val;
Extract value from form element (such as C