Description Usage Arguments Value Examples
Read fisheries XML data format file. Currently supports IMR Biotic version 1 until 3, IMR Echosounder version 1, and IMR Landing version 2 formats at the moment. Streaming XML pull parser can be used to avoid loading the whole XML into memory and it supports ZIP file reading. Please note that the XML file inside the zip file should be using the same name as the zip file itself (e.g. test.xml inside test.zip).
1 2 3 4 5 6 7 | readXmlFile(
xmlFilePath,
stream = TRUE,
useXsd = NULL,
usePrefix = NULL,
verbose = FALSE
)
|
xmlFilePath |
full path to the XML file to be read. |
stream |
a streaming XML pull parser is used if this is set to TRUE. An XML DOM parser is used if this is set to FALSE. Default to TRUE. |
useXsd |
Specify an xsd object to use. Default to NULL. |
usePrefix |
Manually specify a namespace prefix. Default to NULL. |
verbose |
Show verbose output. Default to FALSE. |
List of data.table objects containing the "flattened" XML data.
1 2 3 4 5 6 7 8 9 | ## Not run:
# Reading test.xml using XML pull parser
one <- readXmlFile("./test.xml")
# Reading test.xml using XML DOM parser
two <- readXmlFile("./test.xml", stream = FALSE)
# Reading test.xml inside test.zip file
three <- readXmlFile("./test.zip")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.