In our 2 previous posts, we introduced the SOAP methods responsible for retrieving and storing individual 1003 Loan Application records. The standard and preferred method for the delivery of content on the internet - XML – will facilitate the data exchange between client applications and the XWeb1003 web service. One of the biggest advantages that XML has to offer, especially when it comes to data interchange, is its ability to explicitly define the data; in our case, we can clearly represent each and every field of the physical Uniform Residential Loan Application (Form 1003) as an XML attribute or element. Client applications, using publicly available XML parsers and, perhaps, XSLT, can then interpret and manipulate this data to their own liking.
Without carefully analyzing the physical 1003 Loan Application, one would be tempted to simply represent each section of the physical application as its own element directly under the root node:
<Application>
<Type_And_Terms>
<Property_And_Purpose>
<Construction>
<Refinance>
</Property_And_Purpose>
<Borrower_Information>
<Employment_Information>
</Application>Although not incorrect, we decided to take a different approach:
<Application>
<Property>
<Purpose>
<Construction>
<Refinance>
</Purpose>
<Borrowers>
<Borrower>
<Addresses>
<Address>
...
</Addresses>
<Employment_Information>
<Employment>
...
</Employment_Information>
</Borrower>
...
</Borrowers>
</Application>The second example is much easier to read and understand, at least in our opinion:
- The details of the application as well as the loan, which is what the application ultimately leads to, are listed under the root node.
- The Application is for a specific Property.
- The Loan has a Purpose.
- The purpose of the Loan can be Construction, and therefore more details are provided.
- The purpose of the Loan can be a Refinance, and more details are provided regarding a refinance.
- The rest of the information is related to Borrowers.
- There can be a Borrower and Co-borrower.
- Each can list one or more addresses, if either resided at their present address for less than 2 years.
- Each can list present, as well as past, Employment Information.
- Etc. (Page 2 and 3 is information related to "Borrowers")