SPDocumentParser Class

Base class that supports property promotion and demotion for HTML documents.

Inheritance Hierarchy


Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No


<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPDocumentParser _
    Inherits SPAutoSerializingObject
Dim instance As SPDocumentParser
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPDocumentParser : SPAutoSerializingObject


Use the PluggableParsers property of the SPWebService class to return the collection of document parsers that are implemented in a Web service.


The following example iterates through the collection of document parsers used within a Web service to display their properties.

Dim webService As New SPWebService("whatever", SPFarm.Local)
Dim myParsers As System.Collections.Generic.Dictionary(Of String, SPDocumentParser) = webService.PluggableParsers
Dim myKeys As System.Collections.Generic.Dictionary(Of String, SPDocumentParser).KeyCollection = myParsers.Keys

Dim key As String

For Each key In myKeys
    Response.Write("Class ID = " & myParsers(key).ClassId.ToString() & " File Extension = " & myParsers(key).FileExtension & " ProgID = " & myParsers(key).ProgId & "<BR>")
Next key
SPWebService webService = new SPWebService("lwswss1", SPFarm.Local);
System.Collections.Generic.Dictionary<string, SPDocumentParser> myParsers = webService.PluggableParsers;
System.Collections.Generic.Dictionary<string, SPDocumentParser>.KeyCollection myKeys = myParsers.Keys;

foreach (string key in myKeys)
    Response.Write("Class ID = " + myParsers[key].ClassId.ToString() + " File Extension = " + myParsers[key].FileExtension + " ProgID = " + myParsers[key].ProgId + "<BR>");

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


SPDocumentParser Members

Microsoft.SharePoint.Administration Namespace


Other Resources

Custom Document Parsers