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 Explorer 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.Explorer.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 Explorer for SharePoint downloaden Download free version of MAPILab Explorer for SharePoint (2760 KB):

Primary server
Secondary server

Product homepage
Screenshots
Version history
Ïðèìåðû èñïîëüçîâàíèÿ MAPILab Explorer for SharePoint
Example of work with MAPILab Explorer 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-2010 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.
Quick links to MAPILab software:
Reporting Solutions
Add-ins for Outlook
Plugins for Outlook
Addons for Office
Disclaimers for Exchange
Software for SharePoint
Add-ons for Exchange
Groupware tools
Developer solutions
Plugins for Microsoft Excel