Output XML Responce

Nov 14, 2011 at 4:12 PM

Is there a way to output the actual xml responce to a div tag or textarea field, not the method for looking for an individual element but everything returned in the xData including all the tags and attributes to be displayed on a page?

For example, if I use the GetList method, I would want to be able to display the below on the webpage, tags, attributes, et. al.

<List DocTemplateUrl="" DefaultViewUrl="/Site_Name/Lists/List_Name/AllItems.aspx"
   ID="{42FC00F1-F7EA-4ECE-9D4C-F47A95A806B2}" Title="List_Name" Description="Description"
   ImageUrl="/_layouts/images/itgen.gif" Name="{42FC00F1-F7EA-4ECE-9D4C-F47A95A806B2}"
   BaseType="0" ServerTemplate="100" Created="20030616 18:37:44" Modified="20030618 18:26:57"
   LastDeleted="20030616 18:37:44" Version="2" Direction="none" ThumbnailSize="" WebImageWidth=""
   WebImageHeight="" Flags="4096" ItemCount="5" AnonymousPermMask=""
   RootFolder="/Site_Name/Lists/List_Name" ReadSecurity="1" WriteSecurity="1"
   Author="1" EventSinkAssembly="" EventSinkClass="" EventSinkData="" EmailInsertsFolder=""
   AllowDeletion="True" AllowMultiResponses="False" EnableAttachments="True" EnableModeration="False"
   EnableVersioning="False" Hidden="False" MultipleDataList="False" Ordered="False" ShowUser="True"
   xmlns="http://schemas.microsoft.com/sharepoint/soap/">
   <Fields>
      <Field ColName="tp_ID" ReadOnly="TRUE" Type="Counter" Name="ID" PrimaryKey="TRUE"
         DisplayName="ID" FromBaseType="TRUE" />
      <Field Type="Text" Name="Title" DisplayName="Title" Required="TRUE" FromBaseType="TRUE"
         ColName="nvarchar1" />
         ...
   <Fields>
   <RegionalSettings>
      <Language>1033<Language>
      <Locale>1025<Locale>
      <CalendarType>6<CalendarType>
      <AdvanceHijri>-1</AdvanceHijri>
      <TimeZone>1</TimeZone>
      <Time24>1</Time24>
      <SortOrder>1033<SortOrder>
      <Presence Enabled=”True” />
    </RegionalSettings>
</List>

Coordinator
Nov 14, 2011 at 4:15 PM
Sure. You can see the text version of the XML by looking at xData.responseText. So, for instance:
alert(xData.responseText);

M.
Nov 14, 2011 at 4:44 PM

That worked! Thanks Marc.

Coordinator
Nov 14, 2011 at 5:22 PM
No problem.

M.