Dirxml
From FirebugWiki
(Difference between revisions)
Sebastianz (Talk | contribs) (Added description of syntax and linked back to Command Line API) |
Sebastianz (Talk | contribs) (Added parameter description and examples) |
||
| Line 1: | Line 1: | ||
| - | + | Prints the XML source tree of an HTML or XML node. | |
| - | + | This includes the node itself plus all it's descendants and looks identical to the view inside the [[HTML Panel]]. You can click on any node to inspect it in the HTML panel. | |
| - | + | ||
| - | This looks identical to the view inside the [[HTML Panel]]. You can click on any node to inspect it in the HTML panel. | + | |
== Syntax == | == Syntax == | ||
| Line 9: | Line 7: | ||
dirxml(node) | dirxml(node) | ||
</source> | </source> | ||
| + | |||
| + | == Parameters == | ||
| + | === node === | ||
| + | HTML or XML node to display. | ||
| + | |||
| + | == Examples == | ||
| + | <source lang="javascript"> | ||
| + | dirxml(document.body) | ||
| + | </source> | ||
| + | |||
| + | Displays the whole element tree structure of the <code><body></code> tag. | ||
| + | |||
| + | <source lang="javascript"> | ||
| + | dirxml($("element")) | ||
| + | </source> | ||
| + | |||
| + | Displays the whole element tree struction of the element with the id <code>element</code> using the [[$|$ command]]. | ||
== See also == | == See also == | ||
* [[dir]] | * [[dir]] | ||
* [[Command Line API]] | * [[Command Line API]] | ||
Revision as of 10:44, 13 July 2012
Prints the XML source tree of an HTML or XML node.
This includes the node itself plus all it's descendants and looks identical to the view inside the HTML Panel. You can click on any node to inspect it in the HTML panel.
Contents |
Syntax
dirxml(node)
Parameters
node
HTML or XML node to display.
Examples
dirxml(document.body)
Displays the whole element tree structure of the <body> tag.
dirxml($("element"))
Displays the whole element tree struction of the element with the id element using the $ command.