Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xmlEventHandler

Default handlers for the SAX-style event XML parser


Description

This is a function that returns a closure instance containing the default handlers for use with xmlEventParse for parsing XML documents via the SAX-style parsing.

Usage

xmlEventHandler()

Details

These handlers simply build up the DOM tree and thus perform the same job as xmlTreeParse. It is here more as an example, reference and a base that users can extend.

Value

The return value is a list of functions which are used as callbacks by the internal XML parser when it encounters certain XML elements/structures. These include items such as the start of an element, end of an element, processing instruction, text node, comment, entity references and definitions, etc.

startElement
endElement
processingInstruction
text
comment
externalEntity
entityDeclaration
cdata
dom

Author(s)

Duncan Temple Lang

References

See Also

Examples

xmlEventParse(system.file("exampleData", "mtcars.xml", package="XML"),
               handlers=xmlEventHandler())

XML

Tools for Parsing and Generating XML Within R and S-Plus

v3.99-0.10
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>), Tomas Kalibera [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.