Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better description for forced semantics
  • Loading branch information
kraih committed Apr 22, 2017
1 parent 5b53c79 commit fabe4d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

7.31 2017-04-12
7.31 2017-04-22
- Removed deprecated files, slurp and spurt functions from Mojo::Util.
- Removed deprecated parts attribute from Mojo::Home.
- Removed deprecated slurp and spurt methods from Mojo::ByteStream.
Expand Down
10 changes: 5 additions & 5 deletions lib/Mojo/DOM.pm
Expand Up @@ -430,16 +430,16 @@ mode and everything becomes case-sensitive.
my $dom = Mojo::DOM->new('<?xml version="1.0"?><P ID="greeting">Hi!</P>');
say $dom->at('P[ID]')->text;
XML detection can also be disabled with the L</"xml"> method.
# Force XML semantics
my $dom = Mojo::DOM->new->xml(1)->parse('<P ID="greeting">Hi!</P>');
say $dom->at('P[ID]')->text;
HTML or XML semantics can also be forced with the L</"xml"> method.
# Force HTML semantics
my $dom = Mojo::DOM->new->xml(0)->parse('<P ID="greeting">Hi!</P>');
say $dom->at('p[id]')->text;
# Force XML semantics
my $dom = Mojo::DOM->new->xml(1)->parse('<P ID="greeting">Hi!</P>');
say $dom->at('P[ID]')->text;
=head1 METHODS
L<Mojo::DOM> implements the following methods.
Expand Down

0 comments on commit fabe4d3

Please sign in to comment.