Constraints Builder

Input Example

[
  {
    "field": "name",
    "operator": "C",
    "value": "Nagao"
  },
  {
    "condition": "AND",
    "field": "city",
    "operator": "E",
    "value": "Guarulhos"
  },
  {
    "condition": "OR",
    "field": "state_province_region",
    "operator": "NE",
    "value": "SP"
  }
]

Input toXml

<?xml version="1.0"?>
<constraints>
  <constraint>
    <field>name</field>
    <operator>C</operator>
    <value>Nagao</value>
  </constraint>
  <constraint>
    <condition>AND</condition>
    <field>city</field>
    <operator>E</operator>
    <value>Guarulhos</value>
  </constraint>
  <constraint>
    <condition>OR</condition>
    <field>state_province_region</field>
    <operator>NE</operator>
    <value>SP</value>
  </constraint>
</constraints>