If the content type in the response message is set to text/xml or application/xml, the XML content can be accessed as an ABL X-DOCUMENT object. To process the XML content, cast the Entity field to an OpenEdge.Core.WidgetHandle object and copy the resulting value to an X-DOCUMENT handle. For example:

block-level on error undo, throw.

using OpenEdge.Net.URI.
using OpenEdge.Net.HTTP.IHttpClient.
using OpenEdge.Net.HTTP.IHttpRequest.
using OpenEdge.Net.HTTP.IHttpResponse.
using OpenEdge.Net.HTTP.ClientBuilder.
using OpenEdge.Net.HTTP.RequestBuilder.
using OpenEdge.Core.WidgetHandle.
 
define variable oURI as URI no-undo.
define variable oClient as IHttpClient no-undo.
define variable oRequest as IHttpRequest no-undo. 
define variable oResponse as IHttpResponse no-undo.
define variable hXml as handle no-undo.

//Build a request
oURI = URI:Parse("http://httpbin.org/xml").
oRequest = RequestBuilder:GET(oURI):Request.

//Execute a request
oClient = ClientBuilder:Build():Client.
oResponse = oClient:Execute(oRequest).

//Process the response
if oResponse:StatusCode eq 200 then do:
    message "Success:" oResponse:ContentType.
    create x-document hXml.
    hXml = cast(oResponse:Entity, WidgetHandle):Value.
end.
else
    return error "Request Error: " + STRING(oResponse:StatusCode).

if valid-object(hXml) then
    run GetChildren(hXml, 1).

finally:
    delete object hXml.
end finally.

procedure GetChildren:
    define input parameter hParent as handle no-undo.
    define input parameter level as integer no-undo.
    
    define variable ix as integer no-undo.
    define variable cNode as character no-undo.
    define variable hNoderef as handle no-undo.
    define variable lResult as logical no-undo.
    
    create x-noderef hNoderef.
    
    NODEBLK:
    repeat ix = 1 to hParent:num-children:
        cNode = "".
        lResult = hParent:get-child(hNoderef, ix).
        if not lResult then leave NODEBLK.

        if hNoderef:name eq "person" then
            assign cNode = substitute("&1 Node &2: Attr: 'id' gives &3 &4", cNode, ix,
 hNoderef:get-attribute("id"), hNoderef:attribute-names).
        if hNodeRef:name eq "#text" then do:
            if length(trim(hNodeRef:node-value)) gt 0 then
                assign cNode = substitute("&1 Node &2: Text: &3", cNode, ix, 
hNodeRef:node-value).
        end.
        else
            assign cNode = substitute("&1 Node &2: Name: &3", cNode, ix, hNodeRef:name).

        if cNode gt "" then
            message substitute("Level &1: &2", level, cNode).

        run GetChildren(hNoderef, (level + 1)).
    end.

    finally:
        delete object hNoderef.
    end finally.
end procedure.