Getting value from a XML file of a SPList item

Posted: October 7, 2008 in Object Model, XML

public string GeUserAttributeValue(SPList listCollection, string attributeName,string userName)
{
if (userName == null)
{
userName = this.web.CurrentUser.Name;
}
for (int count = 0; count
}

break;
}
}
return strDeptName;
}

“z”, “#RowsetSchema is the namespace used in the XML and hence we add it to the namespace manager.
ows_Department is the name of field in XML for the Department field in the list.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s