Calculation in SharePoint Designer – Workflow

There are two ways to perform a calculation.

  1. By creating a calculated column for the library and use excel formulas
  2. Using SharePoint designer workflow.

This will help you to perform any calculations using workflow.

Select “Do calculation” from “Action”

you can perform basic mathematical operations like addition, multiplication, division, etc., and store into workflow variable.

Then the workflow variable can be updated into a library column

Sharepoint Item level security – Workflow

Sharepoint has a feature to set item level security either manually or through workflow. In some case we might need to dynamic. (Ex: When we restrict people to view only their region data, we can either create different views per region or create a workflow to set the security level based on their region ) . But if its a sensitive data, creating a view doesnt make sense. Somehow we can pull up the data even by creating our own view). This article shows you how to set item level security using SharePoint workflow

1. Select impersonation step, it creates an unique step 

2. Now if you click on “Action”, you will notice some new list actions. Add list permission, Inherit list permission, …

with this actions, you can modify current item’s permission or any other list’s item permission.

Web Services in SharePoint 2007

This tutorial shows how to access the user names from People or Groups using

SharePoint webservices

Step 1: On DataSource Library pane, XML Web Services is the option to invoke
web services.

Step 2: Paste the web services link (https://<sharepointLocation>/_vti_bin/usergroup.asmx?WSDL)
for the user group data and click on connect. This will retrieve data of people.

In this below screenshot, GetUserCollectionFromGroup is an operation which retrieves the
people details belongs to the specified group name.

Step 3: Once the operation selected, it will show the parameters required for
that operation. In this case, groupName is the input parameter for
GetUserCollectionFromGroup. I have created a NewGroup group in my sharePoint. So
here i am passing “NewGroup” to that operation.

Step 4: Click on Login tab. Enter Username and password to establish the
connection

Step 5: Now click on show data, it will show all the data.

Step 6: Select Name and click on Insert Selected Fields and select multiple item
view

Step 7: This will show the data into the screen . The next step is to filter
the data based on the current login.

in the above screenshot, UserID needs included in order to use the CAMLVariable
UserID.

Step 8: Please change the below code to see if the current user name exists in
the group

In order to get the Number
of Rows
<xsl:variable name=”Rows” select=”/soap:Envelope/soap:Body/ddw1:GetUserCollectionFromGroupResponse/ddw1:GetUserCollectionFromGroupResult/ddw1:GetUserCollectionFromGroup/ddw1:Users/ddw1:User”/>

to<xsl:variable name=”Rows” select=”/soap:Envelope/soap:Body/ddw1:GetUserCollectionFromGroupResponse/ddw1:GetUserCollectionFromGroupResult/ddw1:GetUserCollectionFromGroup/ddw1:Users/ddw1:User[@Name=$UserID]“/>
<table>
<tr><td>
<xsl:value-of select=”$count(Rows)” />
</td></tr>

</table>

XSLT Formulas

Multi Level Dropdowns in NewForm

Below tutorial shows how to use Formulas in XSLT

Step1 : Insert DataView Web Part. Select the List you wanted to show it in XSLT
and Click on Show Data

Step 2: Select the Columns would like to display and click on Insert Selected
Fields as -> Multiple Item View [This will query all the Records] -> Single Item
View [Query only one Single Record]

Step 3: It will display the below columns. Click on DataView Properties

Step4: Select Show View footer

Step5: Count(/dsQuery/Response/Rows/Row) – This will give the no of records
sum(/dsQuery/Response/Rows/Row/<@ColumnName>) – This will do the summation of
all the values on columnName . Likewise the following operators can be used in
XSLT (average(), ceiling(), floor(), max(), min(), number(), random(), etc..)

Count : <xsl:value-of select="count(/dsQueryResponse/Rows/Row)" />
<br />
Collateral : <xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@Collateral)"
/>
<br />
Web Designing : <xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@Web_x0020_Designing)"
/>


 

Interlink two Custom lists Library (Project Tracker)

Multi Level Dropdowns in NewForm

Below tutorial shows how to inter link two custom lists with ID as a Key. I
have taken project logs as an Example

Pictorial View of how the mapping is going to be done with two custom lists

ID from Project Details list and Project ID from Project Logs list are the key
for mapping, where ID from project Details is autogenerateed

Step 1: Create Project Details List with Columns Project Title and Project
Description

Step 2: Create Project Logs with Columns Module ,  Hrs Spent and
ProjectID

Step 3: The logs creation can be done after the ID been created for each Record.
So including the log entry in Newform.aspx is not possible until you have some
Idea to generate unique IDs. So here log entry has been given in the
Dispform.aspx for each project details.

Step4: Open Dispform.aspx of Project Details and Insert a HyperLink below the
form saying "Add Log"
    Each Project Details have ID generated.
    ID is the key for the logs.
    For every log entry ID been stored in Project ID in Projects
Logs List

Step5: Add Log Link should be customized based on the Project Selected. (Example
: /NewForm.aspx?ProjectID=<ID>)

Step6: ID needs to be fetched from the URL and Concatenate with the Add Log Link
using the javascript below
 

<script type="text/javascript">
function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}
document.write(‘<a href="<sharePoint Link>/Lists/Project
Logs/NewForm.aspx?ProjectID=’+ querySt("ID") +’&Source=<sharePoint
Link>/Lists/Project Details/DispForm.aspx?ID=’+ querySt("ID") +’">Add a
Log</a>’)
</script>

Step 7: Pass ProjectID from Hyperlink to the Project ID text box to create a
mapping between project and it logs.

Step8: Put the below javascript inside Newform.aspx of Project Logs to grab the
ProjectID value from Hyperlink and put it inside Project ID Textbox. Get the ID
for the textbox through "View Source" or Select /Copy
dropdown from Browser and paste it in SharePoint Designer /Front Page/
Dreamweaver to get the ID.
 

<script type="text/javascript">

function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}
document.getElementById("ctl00_m_g_e7196a27_da13_4732_9066_66eac5f5c220_ctl00_ctl04_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_TextField").value=querySt("ProjectID")

</script>
 

Step 9: Now the Entire Project ID <tr> needs to be hidden from the user in order
to avoid the mapping problem. Below javascript code helps to hide the entire TR
of project ID

<script language="javascript" type="text/javascript">

_spBodyOnLoadFunctionNames.push("hideFields");

function findacontrol(FieldName) {

var arr = document.getElementsByTagName("!");
// get all comments
for (var i=0;i < arr.length; i++ )
{
// now match the field name
if (arr[i].innerHTML.indexOf(FieldName) > 0)
{ return arr[i]; }
}
}

function hideFields() {
var control = findacontrol("Project ID");
control.parentNode.parentNode.style.display="none";
}
</script>

Step 10: Once submitted, it comes back to Dispform.aspx of Project Details
list. Need to include logs below the project display.

Step 11: Insert ->SharePoint Controls -> WebPart -> Project Logs   
and Convert to XSLT View

Step11: Remove Toolbars from Project Logs.

Step12: Filter the logs based on the ID. After the webpart been converted to
XSLT, Create a parameter that will hold the ID from hyperlink. Below screen
shows how to create a parameter to hold ID value using Query String.

Step 13: Filter Project ID from Project Logs with the Parameter(ProjectID)
created.

Show Columns in Newform.aspx based on Dropdown Selection

Multi Level Dropdowns in NewForm

In the below tutorial, i have two different set of Columns. Based on the
dropdown selection , I will show the set of columns for user to be filled in.

Step 1: Open Newform.aspx / Editform.aspx in SharePoint Designer.

Step 2: Close Webpart

Step 3: Insert -> SharePoint Controls -> Custom List Form

Step 4: Arrange Respective Team Columns into div tags or table tags with
Unique IDs

Step 5:Create one javascript file[main.js] and include in newform.aspx
    <script language="javascript" src="/Images/Main.js"></script>

Step6:  Remove those respective columns and organize into one Table or Div
with ID and by default

<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" id="Team1"
style="display:none"
>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Team1-TitleColumn<span class="ms-formvalidation"></span>
</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New"
FieldName="Title" __designer:bind="{ddwrt:DataBind(‘i’,concat(‘ff2′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@Title’)}"/>
<SharePoint:FieldDescription runat="server" id="ff2description{$Pos}"
FieldName="Title" ControlMode="New"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Team1-DescColumn</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New"
FieldName="Team1_x002d_DescColumn" __designer:bind="{ddwrt:DataBind(‘i’,concat(‘ff3′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@Team1_x002d_DescColumn’)}"/>
<SharePoint:FieldDescription runat="server" id="ff3description{$Pos}"
FieldName="Team1_x002d_DescColumn" ControlMode="New"/>
</td>
</tr>
</table>

</td>
</tr>


Step 8: Get the ID for the dropdown through "View Source" or Select /Copy
dropdown from Browser and paste it in SharePoint Designer /Front Page/
Dreamweaver to get the ID.

Screen 1: Select and Copy from Browser

Screen2 : Paste it in SharePoint Designer

So the ID will be
:ctl00_m_g_3cf01b2a_ddef_4295_8601_e6f031220884_ff1_1_ctl00_DropDownChoice
 

Step 9: Javascript code[Main.js] – Attach Event Listener to the Dropdown, So
onchange / onClick of the dropdown list. Respective team columns should be shown
/ Hiden

document.getElementById("ctl00_m_g_3cf01b2a_ddef_4295_8601_e6f031220884_ff1_1_ctl00_DropDownChoice").attachEvent("onclick",
ShowTeam);

function ShowTeam()
{
w = document.getElementById("ctl00_m_g_3cf01b2a_ddef_4295_8601_e6f031220884_ff1_1_ctl00_DropDownChoice").selectedIndex;
var PL = document.getElementById("ctl00_m_g_3cf01b2a_ddef_4295_8601_e6f031220884_ff1_1_ctl00_DropDownChoice").options[w].text;

// Hidding all Teams Columns
document.getElementById("Team1").style.display="none"
document.getElementById("Team2").style.display="none"

//Showing only the team which has been selected
document.getElementById(PL).style.display="block"
}

Step 9: Change dropdown value

Multi Level Dropdown in newform.aspx

Multi Level Dropdowns in NewForm

Multi Level Dropdowns in NewForm.aspx / EditForm.aspx

Step 1: Create one Custom List where it holds all Multilevel data. (Backend
database for Multi Levels)

Step 2: Create the MainList Customlist with the following Columns

Level 1-> Single line of text
Level 2-> Single line of text
Level 3-> Single line of text

Step 3: Open Newform.aspx [MainList]  in SharePoint Designer

i
 – NewForm.aspx has to be customized  so Close the existing
ListFormWebpart

 Step 4: Include Customized form and include three dropdowns (level1,
level2,level2)
         Ex: for Level1
<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="Level_x0020_1"
__designer:bind="{ddwrt:DataBind(‘i’,concat(‘ff2′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@Level_x0020_1′)}"/>
<select id="Level1"></select>

Step 5:Create one javascript file[main.js] and include in newform.aspx
    <script language="javascript" src="Main.js"></script>

Step 6: In Main.js Use Microsoft.XMLDom to access the sharePoint list as XML
Microsoft.XMLDOM will work only in IE. use XMLHttpRequest to make it work in
Firefox and Chrome
|   xml_doc = new ActiveXObject("Microsoft.XMLDOM");

Step7:  Create three different arrays and one object and collect all levels
value to respective array

var L1=new Array()
var L2=new Array()
var l3=new Array()
var DataC=[];
xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc.load("<server>/_vti_bin/owssvr.dll?Cmd=Display&List={ListID}&Query=*&XMLDATA=TRUE");

//STRVALUE = xml_doc.documentElement.childNodes(1).childNodes;
STRVALUE = xml_doc.getElementsByTagName("z:row");
alert(STRVALUE.length)
for(i=0;i<STRVALUE.length;i++)
{
L1[i]=STRVALUE[i].getAttribute("ows_Level1")
L2[i]=STRVALUE[i].getAttribute("ows_Level2")
L3[i]=STRVALUE[i].getAttribute("ows_Level3")
}


Step 8: Get unique values of first level value. Use the below javascript
function to get unique values for array

Array.prototype.unique = function() {
var a = [];
var l = this.length;
for(var i=0; i<l; i++) {
for(var j=i+1; j<l; j++) {
// If this[i] is found later in the array
if (this[i] === this[j])
j = ++i;
}
a.push(this[i]);
}
return a;
};

Step 9: Get unique values for first level and populate the first dropdown

L1=L1.unique();
for(j=0;j<L1.length;j++)
document.getElementById("Level1").options.add(new Option(L1[j],L1[j]))

Step 10: Collate all level2 and level 3 data into objects
  Ex: For Level 2 Data object DataC["ServerLevel2-Sample1"]
will hold all
level2 data for Serverlevel1-Sample1
  Ex: For Level 3 Data object DataC["ServerLevel2-Sample1ServerLevel2-Sample11"]
will hold all level 3 data for the selection of Level1: Serverlevel1-Sample1 and
Level2 : ServerLevel2-Sample11

Step 11: Collecting level2 and level3 data into Object

for(SL1=0;SL1<L1.length;SL1++)
{
DataC[L1[SL1]]=[];  // Create object Ex: DataC["ServerLevel2-Sample1"]
for(M=0;M<STRVALUE.length;M++)
{
if( STRVALUE[M].getAttribute("ows_Level1")==L1[SL1])
DataC[L1[SL1]].push(STRVALUE[M].getAttribute("ows_ServiceLevel2"))
}
DataC[L1[SL1]]=DataC[L1[SL1]].unique();
for(SL2=0;SL2<L2.length;SL2++)
{
DataC[L1[SL1]+L2[SL2]]=[];
for(M=0;M<STRVALUE.length;M++)
if( STRVALUE[M].getAttribute("ows_Level1")==L1[SL1] &&
STRVALUE[M].getAttribute("ows_Level2")==L2[SL2])
DataC[L1[SL1]+L2[SL2]].push(STRVALUE[M].getAttribute("ows_Level3"))

}
}

Step 12:
On Selecting level 1 , populating level 2 values in dropdown 2.
So initiate the onchange event for dropdown 1 and call a function LevelChange
<select id="Level1" onchange="LevelChange(‘Level2’,this.options[this.selectedIndex].text,this)"></select>
(LevelChange(TargetDropdown, Dropdown1value,this))
On Selecting level2 , populating level 3 values in dropdown 3
So initiate the onchange event for dropdown 2 and call a functio LevelChange
<select id="Level2" onchange="var t=document.getElementById(‘Level1’);LevelChange(‘Level3’,t.options[t.selectedIndex].text+this.options[this.selectedIndex].text,this)"></select>


(LevelChange(TargetDropdown, Dropdown1value+Dropdown2value,this))
On Selecting Level3 , No dropdown should populate
<select id="Level3" onchange="LevelChange(”,”,this)"></select>
(LevelChange(null, null,this))
 

Step 13: Create function levelChange

function LevelChange(ID,Data,this)
{
document.getElementById(ID).options.length=0;
for(i=0;i<DataC[Data].length;i++)
{
document.getElementById(ID).options.add(new
Option(DataC[Data][i],DataC[Data][i]))
}
}

Step 14: Now on select each dropdown, the corresponding textbox should
populate the selected dropdown value.
So modifying the levelChange function a bit to pass the dropdown value to
textboxes. Grab the ID for each textbox from "ViewSource"

 

function LevelChange(ID,Data,Current)
{
if(Current.id!="Level3")
{
document.getElementById(ID).options.length=0;
for(i=0;i<DataC[Data].length;i++)
{
document.getElementById(ID).options.add(new
Option(DataC[Data][i],DataC[Data][i]))
}
}
if(Current.id=="Level1")
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff2_1_ctl00_ctl00_TextField").value=Current.options[Current.selectedIndex].text
if(Current.id=="Level2")
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff3_1_ctl00_ctl00_TextField").value=Current.options[Current.selectedIndex].text
if(Current.id=="Level3")
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff4_1_ctl00_ctl00_TextField").value=Current.options[Current.selectedIndex].text
}

Step 15: Hide all three textboxes.
 

document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff2_1_ctl00_ctl00_TextField").style.display="none"
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff3_1_ctl00_ctl00_TextField").style.display="none"
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff4_1_ctl00_ctl00_TextField").style.display="none"

Complete js file

Array.prototype.unique = function() {
var a = [];
var l = this.length;
for(var i=0; i<l; i++) {
for(var j=i+1; j<l; j++) {
// If this[i] is found later in the array
if (this[i] === this[j])
j = ++i;
}
a.push(this[i]);
}
return a;
};

var L1=new Array()
var L2=new Array()
var L3=new Array()
var DataC=[];
xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc.load("<SharePointLink>/_vti_bin/owssvr.dll?Cmd=Display&List={ListID}&Query=*&XMLDATA=TRUE");

STRVALUE = xml_doc.getElementsByTagName("z:row");
for(i=0;i<STRVALUE.length;i++)
{
L1[i]=STRVALUE[i].getAttribute("ows_Level1")
L2[i]=STRVALUE[i].getAttribute("ows_Level2")
L3[i]=STRVALUE[i].getAttribute("ows_Level3")
}
L1=L1.unique();
for(j=0;j<L1.length;j++)
document.getElementById("Level1").options.add(new Option(L1[j],L1[j]))

for(SL1=0;SL1<L1.length;SL1++)
{
DataC[L1[SL1]]=[];
for(M=0;M<STRVALUE.length;M++)
{
if( STRVALUE[M].getAttribute("ows_Level1")==L1[SL1])
DataC[L1[SL1]].push(STRVALUE[M].getAttribute("ows_Level2"))
}
DataC[L1[SL1]]=DataC[L1[SL1]].unique();
for(SL2=0;SL2<L2.length;SL2++)
{
DataC[L1[SL1]+L2[SL2]]=[];
for(M=0;M<STRVALUE.length;M++)
if( STRVALUE[M].getAttribute("ows_Level1")==L1[SL1] &&
STRVALUE[M].getAttribute("ows_Level2")==L2[SL2])
DataC[L1[SL1]+L2[SL2]].push(STRVALUE[M].getAttribute("ows_Level3"))
}
}

function LevelChange(ID,Data,Current)
{
if(Current.id!="Level3")
{
document.getElementById(ID).options.length=0;
for(i=0;i<DataC[Data].length;i++)
{
document.getElementById(ID).options.add(new
Option(DataC[Data][i],DataC[Data][i]))
}
}
if(Current.id=="Level1")
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff2_1_ctl00_ctl00_TextField").value=Current.options[Current.selectedIndex].text
if(Current.id=="Level2")
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff3_1_ctl00_ctl00_TextField").value=Current.options[Current.selectedIndex].text
if(Current.id=="Level3")
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff4_1_ctl00_ctl00_TextField").value=Current.options[Current.selectedIndex].text

}
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff2_1_ctl00_ctl00_TextField").style.display="none"
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff3_1_ctl00_ctl00_TextField").style.display="none"
document.getElementById("ctl00_m_g_4ec47aa8_03c3_4083_b395_a581c10b60ba_ff4_1_ctl00_ctl00_TextField").style.display="none"
 

Access SharePoint list in Flex

Simply put together the link as below.

http://[Server]/_vti_bin/owssvr.dll?Cmd=Display&List={GUID}&XMLDATA=TRUE

How to get GUID for List  

1. Site Actions -> Site Settings

2. Click on Site Libraries and lists

3.click on the list which you would like to access as XML.

4. Get the List ID from the Redirected URL

5.http://[Server]/_vti_bin/owssvr.dll?Cmd=Display&List={80D18622-447F-4900-90A5-E424EDB95DCD}&XMLDATA=TRUE

6. XML Output

How to read SharePoint List from Flex 

<?xml version=”1.0″ encoding=”utf-8″?><mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”
creationComplete=”onCreate(event)”><mx:Script><![CDATA[
import mx.controls.Alert;
private function onCreate(e:Event):void
{
var XMLLoader:URLLoader=new URLLoader(new URLRequest(“http://[localHost]/_vti_bin/owssvr.dll?Cmd=Display&List={80D18622-447F-4900-90A5-E424EDB95DCD}&XMLDATA=TRUE”))
XMLLoader.addEventListener(Event.COMPLETE,openXMLValues)
function openXMLValues(e:Event):void
{
var XMLL:XMLList=new XMLList(e.target.data)
var rsNS:Namespace = XMLL.namespace(“rs”);// Create Namespace inorder to access the XML node <rs:>
var zNS:Namespace = XMLL.namespace(“z”);// Create Namespace inorder to access the XML node <z:
var sNS:Namespace = XMLL.namespace(“s”); // Create Namespace inorder to access the XML node <s:
var FinalXML:XMLList=new XMLList(XMLL.rsNS::data.zNS::row) // access the node <rs:row>
Alert.show(FinalXML.@ows_LinkTitle)
}
}]]>
</mx:Script>
</mx:Application>

URLLoader  

The URLLoader class downloads data from a URL as text, binary data, or
URL-encoded variables. It is useful for downloading text files, XML, or other
information to be used in a dynamic, data-driven application.

var XMLLoader:URLLoader=new URLLoader(new URLRequest(“http://[localHost]/_vti_bin/owssvr.dll?Cmd=Display&List={80D18622-447F-4900-90A5-E424EDB95DCD}&XMLDATA=TRUE“))

XMLLoader.addEventListener(Event.COMPLETE,openXMLValues)

XMLList  

The XMLList class contains methods for working with one or more XML elements. An
XMLList object can represent one or more XML objects or elements (including
multiple nodes or attributes), so you can call methods on the elements as a
group or on the individual elements in the collection.

var XMLL:XMLList=new XMLList(e.target.data)

XMLL will have the entire XML elements including all attributes and nodes.

RecordSet XML vs Normal XML  

RecordSet XML

<xml xmlns:s=’uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882′ xmlns:dt=’uuid:C2F41010-65B3-11d1-A29F-00AA00C14882′xmlns:rs=’urn:schemas-microsoft-com:rowset’ xmlns:z=’#RowsetSchema’>
<s:Schema id=’RowsetSchema’>
<s:ElementType name=’row’ content=’eltOnly’ rs:CommandTimeout=’30’>
<s:AttributeType name=’ID’ rs:number=’1′>
<s:datatype dt:type=’int’ dt:maxLength=’4′ rs:precision=’10’ rs:fixedlength=’true’ rs:maybenull=’false’/>
</s:AttributeType>
<s:AttributeType name=’c1′ rs:name=’Status Code’ rs:number=’2′rs:writeunknown=’true’>
<s:datatype dt:type=’string’ dt:maxLength=’20’ rs:fixedlength=’true’ rs:maybenull=’false’/>
</s:AttributeType>
<s:extends type=’rs:rowbase’/>
</s:ElementType>
</s:Schema>
<rs:data><z:row ID=’1′ c1=’Add ‘/>
<z:row ID=’2′ c1=’Drop ‘/>
<z:row ID=’3′ c1=’Modify Date ‘/>
<z:row ID=’4′ c1=’Complete ‘/>
<z:row ID=’5′ c1=’Modify Parameters ‘/>
</rs:data>
</xml>

In order to access <z:row> recordset, you need to create Namespace for z: , rs:
, s: ,etc..,

var XMLL:XMLList=new XMLList(e.target.data)
var rsNS:Namespace = XMLL.namespace(“rs”);// Create Namespace inorder to access
the XML node <rs:>
var zNS:Namespace = XMLL.namespace(“z”); // Create Namespace inorder to access the XML node <z:
var sNS:Namespace = XMLL.namespace(“s”); // Create Namespace inorder to access the XML node <s:
var FinalXML:XMLList=new XMLList(XMLL.rsNS::data.zNS::row) // access the node <rs:row>
Alert.show(FinalXML.@ows_LinkTitle)

Normal XML

<xml >
<data>
<row ID=’1′ c1=’Add ‘/>
<row ID=’2′ c1=’Drop ‘/>
<row ID=’3′ c1=’Modify Date ‘/>
<row ID=’4′ c1=’Complete ‘/>
<row ID=’5′ c1=’Modify Parameters ‘/>
</data>
</xml>

var XMLL:XMLList=new XMLList(e.target.data)
var FinalXML:XMLList=new XMLList(XMLL.data.row)
Alert.show(FinalXML.@ows_LinkTitle)

Accessing SharePoint List as XML

1. Returning all data for a SharePoint list,
including its XSD –http://[localhost]/_vti_bin/owssvr.dll?Cmd=Display&amp;List={ListGuid}&amp;Query=*&amp;XMLDATA=TRUE

2.Rreturning data of SharePoint list based on a specific view from the list –http://[localhost]/_vti_bin/owssvr.dll?Cmd=Display&amp;List={ListGuid}&amp;View={ViewGuid}&amp;XMLDATA=TRUE

3.Returning List definition – http://[localhost]/_vti_bin/owssvr.dll?Cmd=ExportList&amp;List={ListGuid}

4. Retrieving ONET.XML – http://[localhost]/_vti_bin/owssvr.dll?Cmd=GetProjSchema

5. Retrieving field types – http://[localhost]/vti_bin/owssvr.dll?Cmd=GetProjSchema&amp;SiteTemplate=fldtypes