XML Parsing

If you have any trouble with Parsing or XSLTs please feel free to contact Marissa Kitz (marissa.kitz@yale.edu).

When parsing using XML please be aware of these items:

  • The loop attribute is where each row is returned
    • Example from PeopleService (Person is the loop):

      PeopleService
      <People>
          <Person>
              <Affiliations>
                  <YaleRelationships>MP</YaleRelationships>
                  <PYaleRelationship>MP</PYaleRelationship>
                  <Affiliate>N</Affiliate>
                  <Alumnus>N</Alumnus>
                  <Employee>Y</Employee>
              </Affiliations>
          </Person>
          <Person>
              <Affiliations>
                  <YaleRelationships>CAS</YaleRelationships>
                  <PYaleRelationship>CAS</PYaleRelationship>
                  <Affiliate>N</Affiliate>
                  <Alumnus>N</Alumnus>
                  <Employee>Y</Employee>
              </Affiliations>
          </Person>
      </People>
    • Example from COASegment (Assignee is the loop):

      COASegment
      <COA>
      <Assignee>
          <Assignee_RefID>AA34</Assignee_RefID>
          <Assignee_Name>Ashraf, Assef [P1Placeholder]</Assignee_Name>
          <Assignee_Inactive>No</Assignee_Inactive>
        </Assignee>
        <Assignee>
          <Assignee_RefID>AA582</Assignee_RefID>
          <Assignee_Name>Adebamiro, Adedotun [P1Placeholder]</Assignee_Name>
          <Assignee_Inactive>No</Assignee_Inactive>
        </Assignee>
      </COA>
  • Counts/Version information is shown in the footer
  • There are entities that have special meaning in XML and these characters also exist in the data. So when parsing you should un-escape the values.
    • &lt; represents "<";
    • &gt; represents ">";
    • &amp; represents "&";
    • &apos; represents "'";
    • &quot; represents '"'.
  • The encoding is UTF-8
  • Full data sets are difficult to extract in SOAPUI or Postman and will often result in crashes
  • Null data doesn't return tags in XML. Attributes will only return if these 2 scenarios are true:
                • You have access to see that column
                • There is data for that attribute for that person
  • If you do not require all columns in a data set, you do not have to parse all of the data. Only parse what you need.