# XML Reader

### XMLReader <a href="#xmlreader" id="xmlreader"></a>

**XMLReader** reads an [XML](http://en.wikipedia.org/wiki/XML)-formatted string from a file or from a field and parses it into an object structure.

### Properties <a href="#properties" id="properties"></a>

#### XML source <a href="#xml-source" id="xml-source"></a>

Controls where the function reads the input XML from, and can be one of the following values:

1. File\
   Reads from the XML file defined in the [XML file](#xml-file) property;
2. String\
   Reads from an XML formatted string defined in the [XML string](#xml-string) property.

#### XML file <a href="#xml-file" id="xml-file"></a>

The path to an XML file which will be read by the function.

Displayed when *XML source* is set to 'File'.

#### XML string <a href="#xml-string" id="xml-string"></a>

The XML formatted string to read.

Displayed when *XML source* is set to 'String'.

#### Schema <a href="#schema" id="schema"></a>

The XML schema describing the structure of the XML document. The schema will be used to build the object structure that the function will provide in its output results.

The Schema editor can be used to derive a schema from a sample XML document.

#### Property map <a href="#property-map" id="property-map"></a>

In case you want the object's Property Name to be different to the XML Name, map the names in the Mapping Editor.

Usage: A different property name is required when the value of the XML Name is not valid in Linx.

<div align="left"><figure><img src="https://3338214469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1nxDeDH8GVCXb0XelqGm%2Fuploads%2Fgit-blob-9b95a63c35fc301b650afe03caff6e9b2afaf8e3%2Fpropertymapping.png?alt=media" alt="History"><figcaption><p>Mapping</p></figcaption></figure></div>

### Links <a href="#links" id="links"></a>

[Wikipedia: XML](http://en.wikipedia.org/wiki/XML)

[Sample XML File](http://msdn.microsoft.com/en-us/library/ms762271\(v=vs.85\).aspx)

[Wikipedia XML schema](http://en.wikipedia.org/wiki/XML_schema)

[Wikipedia list of XML schemas](https://en.wikipedia.org/wiki/List_of_types_of_XML_schemas)
