MAPILab - Microsoft Outlook Add-ins and Software for Microsoft Exchange Server
EnglishGermanRussian

Exploration of W3C Document Object Model (DOM)

Let’s consider an example of implementation of MAPILab Spy for SharePoint.

Web service called WebPartPages.asmx, which is included into Windows SharePoint Services, gets requests from client applications in form of xlm-packages. This is an example of such a request:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns oap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetWebPartPage xmlns="http://microsoft.com/sharepoint/webpartpages">
      <documentName>Lists/Links/EditForm.aspx</documentName>
    </GetWebPartPage>
  </soap:Body>
</soap:Envelope>

Our task is to consider the contents of this package.

To solve this problem let’s use the System.Xml.XmlDocument class. Let’s put the above mentioned example in any file, for instance, C:\test.xml. Then let’s open a new code window and change the text of the ‘main’ method in the following way:

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Xml;

public class Tester
{
	static object main(
		 MAPILab.SharePoint.Spy.CodeForm thisForm
		)
	{
		XmlDocument document = new XmlDocument();
		document.Load(@"C:\test.xml");
		return document;
	}
}

This source code loads the contents of the xml-file and then returns created XmlDocument for further examination with the help of the browser of the object model.

Browser of the object model
Click to open real size screenshot

Now we can visually examine our xml in the form of the DOM-model. The node, which is marked out in the picture, includes the name of the document. It is called from the Microsoft SharePoint Designer.

MAPILab Spy for SharePoint downloaden Download 15-days trial version MAPILab Spy for SharePoint (3930 KB):
 Primary server
 Secondary server
MAPILab Spy for SharePoint bestellen Purchase MAPILab Spy for SharePoint online through a secure server.
Product homepage
Screenshots
Version history
Ïðèìåðû èñïîëüçîâàíèÿ MAPILab Spy for SharePoint
Example of work with MAPILab Spy for SharePoint:
Building scripts
Operations with persisted objects
Example of work with Active Directory
Example of work with Windows Forms
Debugging of regular expressions
Exploration of W3C Document Object Model (DOM)
Leave your Suggestion:
Name:
E-mail:
 
 
Search on MAPILab.com:
Get our Newsletter:
E-mail:
© 2003-2009 MAPILab Ltd. All Rights Reserved.

Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.

See also: Office-Outlook.Com :: Office-Excel.Com

Quick links to MAPILab software:

MAPILab Reports

Add-ins for Outlook

Plugins for Outlook

Addons for Office

Software for SharePoint

Add-ons for Exchange

Groupware tools

Developer solutions