Skip to main content

XML

RAW uses the following conventions to parse XML documents:

XML DocumentCorresponding RQL query
<obj/>null
<obj>
<a>hello</a>
<b>1234</b>
</obj>
record(a: “hello”, b: 1234)
<obj>
<a>hello</a>
<a>world</a>
</obj>
record(a: [“hello”, “world”])
<obj name=”value” />record( @name: “value”)
<obj>
<a>hello</a>
Some text here
</obj>
record(a: [“hello”, “world”])
<obj name=”value” id=”123”>
<a>hello</a>
<a>world</a>
<b>1234</b>
<c></c>
Some text here
</obj>
record(
@name: “value”,
@id: 1234,
a: [“hello”, “world”]
b: 1234,
c: null,
#text: “Some text here”)

Multiple variants of reading XML are supported:

  • if connection or other problems trigger a runtime error or return null;
  • if reading a single location or, in the case of file systems read directories or wildcards and merge their contents;
  • if inference is used or whether the type and format properties are specified.