getLineNumber {XML} | R Documentation |
This function is used to query the location of an internal/C-level
XML node within its original "file". This gives us the line number.
It can be combined with docName
to determine the
name of the file and so identify the node location.
This is useful when we identify a node with a particular charactestic and want to view/edit the original document, e.g. when authoring an Docbook article.
getLineNumber(node, ...)
node |
the node whose line number is of interest |
... |
additional parameters for methods should they be defined. |
An integer.
Duncan Temple Lang
libxml2
xmlParse
getNodeSet
xpathApply
f = system.file("exampleData", "xysize.svg", package = "XML") doc = xmlParse(f) e = getNodeSet(doc, "//ellipse") sapply(e, getLineNumber)