Some XML posts can have a rather complex structure. If you have multiple levels of nodes, you can use XPath syntax to grab the information you want.
Ex:
<Application>
<Contact>
<FirstName>Test</FirstName>
<LastName>Tester</LastName>
</Contact>
<Info>
<FirstName>Test</FirstName>
<LastName>Tester</LastName>
</Info>
</Application>
As demonstrated here, two nodes contain First and last names. To grab a specific field, for example contact/firstname, we can use the following path as the incoming field name in VanillaSoft:
//Application/Contact/FirstName
//Application/Contact/LastName
Ex2:
<Contact>
<PhoneNumbers>
<PhoneNumber>
<PhoneNumberValue>3030000000</PhoneNumberValue>
<PhoneNumberType>Home</PhoneNumberType>
</PhoneNumber>
<PhoneNumber>
<PhoneNumberValue>3030000000</PhoneNumberValue>
<PhoneNumberType>Mobile</PhoneNumberType>
</PhoneNumber>
</PhoneNumbers>
</Contact>
In this example, multiple instances of “PhoneNumberValue” is present. In a case where we would like to grab the home phone number, we would need to look for an instance where the “PhoneNumberType” has “home” in it.
Here is the appropriate syntax:
//Contact/PhoneNumbers/PhoneNumber[PhoneNumberType = "Home"]/PhoneNumberValue