Description Usage Arguments Value Examples
This function is useful if one has requested for the return output to be of xml type in get_nutrients.
1 | pretty_xml(result, tag, target = NULL, return_raw = FALSE)
|
result |
An object obtained from get_nutrients with result_type set to xml |
tag |
An xml tag. |
target |
Character. Extract certain attributes from processed xml data. Defaults to NULL. |
return_raw |
Logical. Do you want to get a raw xml file and proceed with processing yourself? Defaults to FALSE. |
If default parameters are used, a semi processed xml file is returned. If target is set, xml attributes corrseponding to target are returned.
1 2 3 4 5 | ## Not run:
if(!require(xml2)) require(xml2)
pretty_xml(res,"food")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.