Compartir a través de


SPDocumentParser Class

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

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.Administration.SPDocumentParser

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<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

Remarks

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

Examples

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

Reference

SPDocumentParser Members

Microsoft.SharePoint.Administration Namespace