aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2014-11-27 16:57:22 +0100
committerLars Magne Ingebrigtsen2014-11-27 16:57:22 +0100
commit2d431afee4061515a593da1f0a29bcd5fb152f07 (patch)
tree003974df1a3052789ea6f7a7a4f747e9a2973fe6 /doc/lispref
parent2f5134c2766be5dcc3eb32b391183a229ee57e19 (diff)
downloademacs-2d431afee4061515a593da1f0a29bcd5fb152f07.tar.gz
emacs-2d431afee4061515a593da1f0a29bcd5fb152f07.zip
Add a DOM pretty-printing function
* doc/lispref/text.texi (Document Object Model): Mention `dom-pp'. * lisp/dom.el (dom-pp): New function.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/text.texi34
2 files changed, 25 insertions, 13 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 37f16a132c3..74966431a45 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12014-11-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * text.texi (Document Object Model): Mention `dom-pp'.
4
12014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org> 52014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 6
3 * text.texi (Document Object Model): New node to document dom.el. 7 * text.texi (Document Object Model): New node to document dom.el.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 3d9451a708f..9c878a00c94 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -4353,13 +4353,13 @@ A call to @code{libxml-parse-html-region} returns this @acronym{DOM}
4353(document object model): 4353(document object model):
4354 4354
4355@example 4355@example
4356(html () 4356(html nil
4357 (head ()) 4357 (head nil)
4358 (body ((width . "101")) 4358 (body ((width . "101"))
4359 (div ((class . "thing")) 4359 (div ((class . "thing"))
4360 "Foo" 4360 "Foo"
4361 (div () 4361 (div nil
4362 "Yes")))) 4362 "Yes"))))
4363@end example 4363@end example
4364@end defun 4364@end defun
4365 4365
@@ -4396,13 +4396,10 @@ node has a node name (called a @dfn{tag}), and optional key/value
4396nodes are either strings or @acronym{DOM} objects. 4396nodes are either strings or @acronym{DOM} objects.
4397 4397
4398@example 4398@example
4399(body 4399(body ((width . "101"))
4400 ((width . "101")) 4400 (div ((class . "thing"))
4401 (div
4402 ((class . "thing"))
4403 "Foo" 4401 "Foo"
4404 (div 4402 (div nil
4405 nil
4406 "Yes"))) 4403 "Yes")))
4407@end example 4404@end example
4408 4405
@@ -4434,6 +4431,9 @@ would be:
4434@item dom-children @var{node} 4431@item dom-children @var{node}
4435Return all the children of the node. 4432Return all the children of the node.
4436 4433
4434@item dom-non-text-children @var{node}
4435Return all the non-string children of the node.
4436
4437@item dom-attributes @var{node} 4437@item dom-attributes @var{node}
4438Return the key/value pair list of attributes of the node. 4438Return the key/value pair list of attributes of the node.
4439 4439
@@ -4494,6 +4494,14 @@ which is a regular expression.
4494 4494
4495@end table 4495@end table
4496 4496
4497Utility functions:
4498
4499@table @code
4500@item dom-pp @var{dom} &optional @var{remove-empty}
4501Pretty-print @var{dom} at point. If @var{remove-empty}, don't print
4502textual nodes that just contain white-space.
4503@end table
4504
4497 4505
4498@node Atomic Changes 4506@node Atomic Changes
4499@section Atomic Change Groups 4507@section Atomic Change Groups