isXMLString {XML} | R Documentation

## Facilities for working with XML strings

### Description

These functions and classes are used to represent and parse a string whose content is known to be XML. `xml` allows us to mark a character vector as containing XML, i.e. of class `XMLString`.

`xmlParseString` is a convenience routine for converting an XML string into an XML node/tree.

`isXMLString` is examines a strings content and heuristically determines whether it is XML.

### Usage

    isXMLString(str)
    xmlParseString(content, doc = NULL, namespaces = RXMLNamespaces, clean = TRUE)
    xml(x)

### Arguments

`str,x,content` | the string containing the XML material.
`doc` |
`namespaces` |
`clean` |

### Author(s)

Dncan Temple Lang

### See Also

`xmlParse` `xmlTreeParse`

### Examples

     isXMLString("a regular string < 20 characters long")
     isXMLString("<a><b>c</b></a>")

     xmlParseString("<a><b>c</b></a>")

      # We can lie!
     isXMLString(xml("foo"))

[Package XML version 2.5-1 Index]