apoc.xml.parse

Function APOC Core

RETURN apoc.xml.parse(<xml string>, <xPath string>, config, false) AS value

Signature

apoc.xml.parse(data :: STRING?, path = / :: STRING?, config = {} :: MAP?, simple = false :: BOOLEAN?) :: (MAP?)

Input parameters

Name Type Default

data

STRING?

null

path

STRING?

/

config

MAP?

{}

simple

BOOLEAN?

false

Usage Examples

The following parses an XML string into a Cypher map:

WITH '<?xml version="1.0"?><table><tr><td><img src="pix/logo-tl.gif"></img></td></tr></table>' AS xmlString
RETURN apoc.xml.parse(xmlString) AS value;
Table 1. Results
value

{_type: "table", _children: [{_type: "tr", _children: [{_type: "td", _children: [{_type: "img", src: "pix/logo-tl.gif"}]}]}]}