constructor documentation
[catagits/DOM-Tiny.git] / README.pod
index 2f6ea69..85a448a 100644 (file)
@@ -95,6 +95,14 @@ XML detection can also be disabled with the L</"xml"> method.
 
 L<DOM::Tiny> implements the following methods.
 
+=head2 new
+
+  my $dom = DOM::Tiny->new;
+  my $dom = DOM::Tiny->new('<foo bar="baz">I ♥ DOM::Tiny!</foo>');
+
+Construct a new scalar-based L<DOM::Tiny> object and L</"parse"> HTML/XML
+fragment if necessary.
+
 =head2 all_text
 
   my $trimmed   = $dom->all_text;
@@ -324,14 +332,6 @@ Find this element's namespace or return C<undef> if none could be found.
   # Find namespace for an element that may or may not have a namespace prefix
   my $namespace = $dom->at('svg > circle')->namespace;
 
-=head2 new
-
-  my $dom = DOM::Tiny->new;
-  my $dom = DOM::Tiny->new('<foo bar="baz">I ♥ DOM::Tiny!</foo>');
-
-Construct a new scalar-based L<DOM::Tiny> object and L</"parse"> HTML/XML
-fragment if necessary.
-
 =head2 next
 
   my $sibling = $dom->next;