This project has moved and is read-only. For the latest updates, please go here.

Output XML Responce

Nov 14, 2011 at 5: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"
      <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" />
      <Presence Enabled=”True” />

Nov 14, 2011 at 5:15 PM
Sure. You can see the text version of the XML by looking at xData.responseText. So, for instance:

Nov 14, 2011 at 5:44 PM

That worked! Thanks Marc.

Nov 14, 2011 at 6:22 PM
No problem.