DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Archive for the ‘XML’ Category

SharePoint Feature Activation Dependences

Posted by PANVEGA on September 7, 2009

A XML element that you can add to our FEATURE.XML is called, “ActivationDependencies”. When WSS activates a feature that defines activation dependencies, it automatically activates any dependent feature that has already been activated.

Here is an example of an activationdependence for the publishing feature.

Read the rest of this entry »


Posted in Deployment, MOSS, XML | Tagged: , , | Leave a Comment »

Adding a Property to the Advanced People Search and a Column to the People Result Webpart

Posted by PANVEGA on June 9, 2009

A customer asked me to adding a Property Field called “Manager”  in the People Search Advanced Mode. For this demonstration I added  custom property called “Manger” to the profile properties, and in the following walkthrough I will show how to add searching on that property to the advanced search screen of the people search. In addition how to add this new field the your Search Core Results Webpart results. Tis how to is devided in 2 main parts. Read the rest of this entry »

Posted in Administration, MOSS, WebParts, XML, XSLT | Tagged: , , , , | 6 Comments »

How to retrieve Sites and Pages from the SiteMapProvider recursively

Posted by PANVEGA on April 8, 2009

In this short post I gonna show you how to retreive  a SharePoint SiteMapProvider here CurrentNavSiteMapProvider (LeftNavBar) in your MasterPage and create a XML file where you gonna write the XmlNodes in a hierarchigal structure. You can use the XML for instance to add the control into your MasterPage and parse the Navigation Tree with Silverlight, JavaScript or Flash in order to get your custom animated SharePoint Navigation.

Sharepoint is going to build you a sitemapprovider based off your logical architecture of your site. So, if you site has a root site and it has children and it’s children have children – then the sitemapprovider it creates for you will look like that.

Read more about SiteMapProvider and how to customize in one of my previous post:

Provides PortalSiteMapNode objects that represent a merging of the Windows SharePoint Services 3.0 SP Navigation store and dynamic site structure, including sites and pages.

 Read the rest of this entry »

Posted in Flash, MasterPage, MOSS, Object Model, SideMapProvider, Silverlight, XML | Tagged: , , , , , , | 1 Comment »

Streaming RealMedia Files (RTSP)

Posted by PANVEGA on February 10, 2009

RTP does not operate on assigned or standardized TCP or UDP ports. However, usually it uses even port numbers. RTCP uses the next higher odd port number. Although there are no standardized recommendations, RTP is often configured to use ports 16384-32767, but may be observed frequently outside this range as well.

The streams controlled by RTSP may use RTP, but the operation of RTSP does not depend on the transport mechanism used to carry continuous media. RTSP is intentionally similar in syntax and operation to HTTP/1.1 so that extension mechanisms to HTTP can in most cases also be added to RTSP. However, RTSP differs in a number of important aspects from HTTP: Read the rest of this entry »

Posted in Administration, Multimedia, Streaming, XML | Tagged: , , | 1 Comment »

Approaches when customizing a DataView WebPart (DVWP)

Posted by PANVEGA on February 7, 2009

In this post I wanna show some tricky approaches when customizing  DataView Webparts (DVWP) in the SP Designer. Maybe the approaches can save you a lot of time. Actually you can customize the weparts view how ever you wish. Customize the Filtering, Grouping and Sorting values in the dvt_1.toolbar template. Present the information with your own CSS classes. Replace the default .ms-toolbar class in the core.css.

Creating the initial dataview can be done on a virtual machine, so there is no risk of breaking anything (and development is easier when you don’t have to deal with the VPN). In SharePoint Designer, create a dataview on any list and convert it to xsl. Don’t make any changes before the conversion, as the conversion doesn’t always work that well.


Microsoft Windows SharePoint Services provides the powerful Data View Web Part that can perform an Extensible Stylesheet Language Transformation (XSLT) on XML data retrieved from a data source. When you are working with a Web site based on Windows SharePoint Services from within Microsoft Office FrontPage 2003, you can use the Data View Web Part to do the following:

  • Define a query and data source from which to retrieve the XML data. Data sources can be SharePoint lists or external databases such as Microsoft SQL Server.
  • Define the XSLT transformation that converts XML retrieved from the data source into HTML. FrontPage offers a WYSIWYG experience for editing these XSLT views, including live data preview. Read the rest of this entry »

Posted in MOSS, SPDesigner, WebParts, XML, XSLT | Tagged: , , , , | 7 Comments »

Introduction in Custom WF Activities

Posted by PANVEGA on January 20, 2009

Microsoft Office SharePoint Designer 2007 allows non-developers to create custom workflows in a straightforward way by using the workflow designer it provides. During the process, the user “glues” together different activities that represent the steps for the workflow. There are numerous activities one can use and the list is extensible. Developers can use Microsoft Visual Studio 2005 to build additional activities and deploy them, so that they are available in Office SharePoint Designer 2007.

My example in the post extendes the default out of the box Activity in the SP Designer (Copy List item). In the default activity you can only copy an item in the same site. I added a new attribute DestinationListUrl which copies the select item from the root list by using the SP Object Model to the destination list in an other site collection.


On Codeplex you find some useful custom SP Activities Read the rest of this entry »

Posted in Administration, C#, Deployment, DotNet, MOSS, Object Model, SPDesigner, Workflows, XML | Tagged: , , , , , , , , | Leave a Comment »

How to create a new List Item Instance with a Feature

Posted by PANVEGA on January 18, 2009

List Instances

A list instance is a list created by using a list template. When creating a list this way, you can override some of the list properties set in the template, and you can include data rows that will also be created as list items in the list. In this example we gonna create a Custom List Instance called BannerList. Read the rest of this entry »

Posted in Event Receivers, MOSS, Site Definition, XML | Tagged: , , , , | Leave a Comment »

Custom Content Type without Title Field

Posted by PANVEGA on January 14, 2009

In my previous post I explained how to build a Custom Content Type.

In this post I wanna show how to remove the default Title field with it´s Item Content Type from your Custom Content Type. By default you can not delete this special kind of field from your list. In addition sometimes it is annoying having this irritating default field. Read the rest of this entry »

Posted in Custom Content Types, Deployment, MOSS, XML | Tagged: , , , | 1 Comment »

How to create a Custom Content Type with a feature

Posted by PANVEGA on January 14, 2009

In this post I am gonna show you in only a few steps and a short introduction how easy it is to create a Custom Content Type  for a SP Feature Deployment.


A Content Type is a SharePoint object that is closely associated to List item (objects that inherit from SPItem), these objects host meta-data information describing the item it’s associated with. In Windows SharePoint Services, a content type is a reusable collection of settings that are applied to a certain category of content. Learn how to build a custom content type by using Microsoft Visual Studio 2005 Extensions for Windows SharePoint Services 3.0.

A Content Type is a definition of the metadata and behavior of a SharePoint list item. In short, it specifies a type of list item based on:

  • The columns that compose the list item;
  • The document template used to create a new item (if it’s a document content type);
  • The information management policies associated with it;
  • The workflows associated with it. Read the rest of this entry »

Posted in Custom Content Types, Deployment, MOSS, XML | Tagged: , , , | 2 Comments »

How to access a custom User Subweb List with SP Object Model

Posted by PANVEGA on July 18, 2008


SharePoint provides a solid framework for the .Net developers to write code against and extend sharepoint functionality. As sharepoint is done on ASP.NET 2.0 and have a power code base of .Net Class libraries, a lot of developers can now make use of them and create excellent applications utilizing sharepoint features and libraries.

As I have been working to develop a custom webservice that our organization will use to present all data from multiple sub-sites to a top-level site in a DropDownList when consuming the service with the SP Designer. I want to be able to generate a query on a Sharepoint environment to give me back the list of all the sites that a user is member of. The method returns a XMLDocument for the webservice.

Read the rest of this entry »

Posted in MOSS, Object Model, WebServices, XML | Tagged: , , | Leave a Comment »

Attachements to a list item using SharePoint Webservices

Posted by PANVEGA on December 16, 2007

In this short post I wanna describe how to add files as an Attachment to a SharePoint list item.

In my previous post Consuming lists.aspx Webservice from SharePoint I showed you how to manage a SharePoint List Webservice. Now I´m gonna add a little bit more tricky thing to the custom cosuming WS method.

Adding an Attachment you need the Add Attchment(..) Method in the lists.asmx Webservice.

public string AddAttachment (
    string listName,
    string listItemID,
    string fileName,
    byte[] attachment


A string that contains either the title or the GUID for the list.
A string that contains the ID of the item to which attachments are added. This value does not correspond to the index of the item within the collection of list items.
A string that contains the name of the file to add as an attachment.
A byte array that contains the file to attach by using base-64 encoding.

Return Value

A string that contains the URL for the attachment, which can subsequently be used to reference the attachment.

Here is an example where I developed a custom ASP.Net Webservice which consumes the Sharepoint lists.aspx Webservice:

[WebMethod(Description = “Set the job appliaction object”)]
public string setApplication(Applicant applicant, string comment, string attache_name, byte[] content)

//here follows the CAML XMLElement method, see my previous post for detailed information


XmlNode return_node = setservice.UpdateListItems(listname, element);

if (return_node.InnerText == “0×00000000″)

if (attache_name != null && content != null)
string return_value = setservice.AddAttachment(listname, return_node.SelectSingleNode(“//@ows_ID”).Value, attache_name, content);



the setApplication(..) function receives an object with all necessary attributes for a job applicant from a ASP.Net Website formular. After adding the job application object successfully to the custom list, go ahead and check the return message. In the return_node you fin the following XML structure:

<Results xmlns="">
   <Result ID="1,Update">
      <z:row ows_ID="4" ows_Title="Title" ows_Modified="2003-06-19 20:31:21"
         ows_Created="2003-06-18 10:15:58" ows_Author="3;#User1_Display_Name"
         ows_Editor="7;#User2_Display_Name" ows_owshiddenversion="3" ows_Attachments="-1"
         ows__ModerationStatus="0" ows_LinkTitleNoMenu="Title" ows_LinkTitle="Title"
         ows_SelectTitle="4" ows_Order="400.000000000000"
         ows_DateColumn="2003-09-04 00:00:00" ows_NumberColumn="791.00000000000000"
         xmlns:z="#RowsetSchema" />

Check the response ErrorCode message. If you receive this 0x00000000 everything was without any errors.

In the next step choose the setservice.AddAttachment(listname, return_node.SelectSingleNode(“//@ows_ID”).Value, attache_name, content); Method. You need the name or GUID from your SharePointlist.

Now comes the tricky thing, in the return node you see the ows_id attribute with the ID =4. This is the new Item ID you created in the previous step. The ID is important to identify the appopriate item in the list.

Using XPATH to catch the item id from the return node. Then you only need the name and the byte code of the file. Thats all you need to add a file to a Sharepoint item.

ASP.NET Web formular example:

Read the rest of this entry »

Posted in ASP.NET, C#, MOSS, WebServices, XML, XPath | Tagged: , , , , , , , | 2 Comments »


Posted by PANVEGA on November 10, 2007

JSON and XML are the two programs that have been lovingly adapted to JavaScript to create Rich Internet Applications. JSON  is a data interchange format whose design goals were to be textual, minimal, and a subset of JavaScript, Standard ECMA-262 3rd Edition – December 1999. JSON is a text format that is completely language independent. It supports two structures: objects (unordered collections of name/value pairs) and arrays (ordered sequences of values), as well as four simple types: strings, numbers, booleans, and null. It’s not associated with any kind of data transportation pattern. When your data comes back from the server, it’s already in a JavaScript object format.

There has been a point of controversy over whether JSON or XML is better at dealing with communication between endpoints. For documents, XML is certainly the leader, supporting namespaces and mixed content. But for communications between live programs, JSON with its implicit hash and array support. With XML, on the other hand, it’s assumed that you might want to stream it in by the gigabyte, or load it into one of a many different in-memory data structures, or run a full-text indexer over the contents, or render it for human consumption, or, well, anything. In addition, XML has some glaring advantages what with XPath and XSLT offering powerful ways to sift through XML datasets and transform them to other formats. However JSON is more succint, but not as much as one might think. But because the syntax is simpler, it parses more quickly.

Read the rest of this entry »

Posted in AJAX, JavaScript, JSON, XML, XSLT | Tagged: , , , | Leave a Comment »