CollegeSource Logo

Support Center


u.select Home

Popular Pages

Skip to end of metadata
Go to start of metadata

Tips on handling XML documents.

XML over HTTP

u.select uses the following de facto standards for sending XML documents over HTTP (or HTTPS):

  • u.select sends the standard HTTP request headers Content-Type and Content-Length
  • The Content-Type is always "text/xml"
  • The Content-Length will be the actual document size
  • By default, u.select sends the XML document within the HTTP body
  • A school can change their u.select settings so u.select sends the XML as an HTML form field (i.e. HTTP request parameter and value)
  • u.select uses the POST method to send the XML

A data capture of the HTTP POST from u.select would look similar to this:

POST /uselect-int/document/xml HTTP/1.1
Content-Type: text/xml
Content-Length: 3087
Host: www.someschool.edu:80
Connection: keep-alive

<RequestDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.transfer.org/xsd/RequestDA_s1h.xsd">
    <Envelope>
        <RequestType>CAS</RequestType>
        <TransactionType>Request Degree Audit</TransactionType>
        <DocumentNumber>2009110315255772</DocumentNumber>
        <PartyId>http://test.transfer.org/uselect/service/xml</PartyId>
    </Envelope>
    <RequestDetail>
        <Control>
            <ControlBatchId>2009110315255772</ControlBatchId>
            <ControlRequestServerName>dars1x</ControlRequestServerName>
            <ControlRecord>UH</ControlRecord>
            <ControlRequestType>A</ControlRequestType>
        </Control>
        <RequestData>
            <Person>
                <PersonID>
                    <PersonIdCodeQualifier>CAS</PersonIdCodeQualifier>
                    <PersonIdCode>super@MU</PersonIdCode>
                </PersonID>
                <PersonName>
                    <NameType>CAS</NameType>
                    <NameFirst>CAS</NameFirst>
                    <NameLast>Student</NameLast>
                </PersonName>
                <StudentType>
                    <StudentTypeStatus>CAS Student</StudentTypeStatus>
                </StudentType>
            </Person>
            <PersonControl>
                <BatchId>2009110315255772</BatchId>
                <ControlRecord></ControlRecord>
            </PersonControl>
            <DegreeProgram>
                <Institution>
                    <Entity>
                        <EntityIDCodeQualifier>73</EntityIDCodeQualifier>
                        <EntityIDCode>007104</EntityIDCode>
                        <EntityIDCodeGroup/>
                    </Entity>
                </Institution>
                <AcademicProgram>
                    <ProgramType>Program</ProgramType>
                    <ProgramCode>AS59BB117</ProgramCode>
                    <ProgramCatalogYear>999999</ProgramCatalogYear>
                </AcademicProgram>
            </DegreeProgram>
            <CourseInstitution>
                <Institution>
                    <Entity>
                        <EntityIDCodeQualifier>73</EntityIDCodeQualifier>
                        <EntityIDCode>003018</EntityIDCode>
                        <EntityIDCodeGroup/>
                    </Entity>
                </Institution>
                <Course>
                    <CourseSubjectAbbreviation>BIOL</CourseSubjectAbbreviation>
                    <CourseNumber>101</CourseNumber>
                    <CourseTitle>Biology</CourseTitle>
                    <CourseSession>200901</CourseSession>
                    <CourseCreditValue>03.00</CourseCreditValue>
                    <CourseAcademicGrade>A</CourseAcademicGrade>
                    <CoursePseudoCode>N</CoursePseudoCode>
                    <CourseFlagCodeType>
                        <CourseFlagCode/>
                    </CourseFlagCodeType>
                </Course>
            </CourseInstitution>
        </RequestData>
    </RequestDetail>
</RequestDocument>

u.select expects external interfaces to also adhere to these de facto standards.

Use an XML parser

u.select sends well formed XML documents, however well formed documents can have an XML version declaration, extra spaces, non required attributes and elements, empty elements, and name spaces that make it difficult to parse with a home grown parser or worse yet straight text/string comparisons. Avoid the temptation to write your own XML parser. Use an existing XML parser.

HTML in XML

Within the context of u.select, it can be normal for an XML document to contain HTML. For the HTML to be correctly transferred between u.select and an external system, both systems must use and accept the two standard methods of escaping markup within text per XML 1.0 specification, section 2.4 Character Data and Markup . To summarize, the HTML content must either be wrapped within an XML <![CDATA[...]]> section or escape any characters that are one of the five predefined XML entities. The following tables identifies the five predefined XML entities with their string escaped representations:

Entity String Escape
& &amp;
< &lt;
> &gt;
' &apos;
" &quot;
Enter labels to add to this page:
Please wait 
Tip: Looking for a label? Just start typing.