getAllNodeNames: Compute the names of all XML nodes in a document

Description Usage Arguments Value See Also Examples

Description

This function is useful for finding the names of all the XML nodes used in the specified XML document. This allows us to verify that there are XSL templates for all of them, find which are most widely used, etc.

Usage

1
getAllNodeNames(doc, full = TRUE)

Arguments

doc

the XML document to be processed. This can be either the file name (or URL) or the already parsed XML document returned from xmlParse .

full

a logical value that indicates whether to use the full name with the XML namespace prefix, or the simple name. This is passed to xmlName .

Value

a frequency table giving the number of times each node name appears in the document.

See Also

wordCount and getWords

Examples

1
2
3
4
5
6
7
  
    
     #  This examines this very document to find all the nodes it uses.
  f = system.file("XMLHelp", "getAllNodeNames.xml", package = "XDocTools")
  getAllNodeNames(f)
	
  

omegahat/XDocTools documentation built on May 24, 2019, 1:57 p.m.