OpenXmlPart Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an abstract base class for all OpenXml parts.
public abstract class OpenXmlPart : DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer
type OpenXmlPart = class
inherit OpenXmlPartContainer
Public MustInherit Class OpenXmlPart
Inherits OpenXmlPartContainer
- Inheritance
- Derived
Constructors
OpenXmlPart() |
OpenXmlPart constructor |
Properties
ContentType |
Represents the content type (MIME type) of the content data in the part. |
DataPartReferenceRelationships |
Enumerates all DataPartReferenceRelationship relationships. (Inherited from OpenXmlPartContainer) |
ExternalRelationships |
Enumerates all external relationships. Hyperlink relationships are not included, use HyperlinkRelationship property to enumerate hyperlink relationships. (Inherited from OpenXmlPartContainer) |
HyperlinkRelationships |
Enumerates all hyperlink relationships. (Inherited from OpenXmlPartContainer) |
OpenXmlPackage |
Represents a part that is in the OpenXmlPackage container. |
Parts |
Enumerates all parts which are relationship targets of this part. (Inherited from OpenXmlPartContainer) |
RelationshipType |
The relationship type of the part. |
RootElement |
Gets the root element of the current part. Returns null when the current part is empty or is not and XML content type. |
Uri |
Represents the internal part path in the package. |
Methods
AddAnnotation(Object) |
Adds an object to the annotation list of this PartContainer. (Inherited from OpenXmlPartContainer) |
AddExtendedPart(String, String, String) |
Adds an extended part ( Application specific part ). (Inherited from OpenXmlPartContainer) |
AddExtendedPart(String, String, String, String) |
Adds an extended part ( Application specific part ). (Inherited from OpenXmlPartContainer) |
AddExternalRelationship(String, Uri) |
Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead. (Inherited from OpenXmlPartContainer) |
AddExternalRelationship(String, Uri, String) |
Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead. (Inherited from OpenXmlPartContainer) |
AddHyperlinkRelationship(Uri, Boolean) |
Adds a new hyperlink relationship. (Inherited from OpenXmlPartContainer) |
AddHyperlinkRelationship(Uri, Boolean, String) |
Adds a new hyperlink relationship. (Inherited from OpenXmlPartContainer) |
AddNewPart<T>() |
Adds a new part of type T. (Inherited from OpenXmlPartContainer) |
AddNewPart<T>(String) |
Adds a new part of type T. (Inherited from OpenXmlPartContainer) |
AddNewPart<T>(String, String) |
Adds a new part of type T. (Inherited from OpenXmlPartContainer) |
AddPart<T>(T) |
Adds the part to the document. Must use the returned part to operate on the part added to the document. (Inherited from OpenXmlPartContainer) |
AddPart<T>(T, String) |
Adds the part to the document with a given relationship identifier (ID). Must use the returned part to operate on the part added to the document (Inherited from OpenXmlPartContainer) |
Annotation(Type) |
Get the first annotation object of the specified type from this PartContainer. (Inherited from OpenXmlPartContainer) |
Annotation<T>() |
Get the first annotation object of the specified type from this PartContainer. (Inherited from OpenXmlPartContainer) |
Annotations(Type) |
Gets a collection of annotations of the specified type for this PartContainer. (Inherited from OpenXmlPartContainer) |
Annotations<T>() |
Gets a collection of annotations of the specified type for this PartContainer. (Inherited from OpenXmlPartContainer) |
ChangeIdOfPart(OpenXmlPart, String) |
Changes the relationship ID of the part. (Inherited from OpenXmlPartContainer) |
CreateRelationshipToPart(OpenXmlPart) |
Adds a relationship for the specified part to this part. (Inherited from OpenXmlPartContainer) |
CreateRelationshipToPart(OpenXmlPart, String) |
Adds a relationship for the specified part to this part. (Inherited from OpenXmlPartContainer) |
DeleteExternalRelationship(ExternalRelationship) |
Deletes the specified external relationship. (Inherited from OpenXmlPartContainer) |
DeleteExternalRelationship(String) |
Deletes the specified ExternalRelationship. (Inherited from OpenXmlPartContainer) |
DeletePart(OpenXmlPart) |
Deletes a specified part in the package root layer. (Inherited from OpenXmlPartContainer) |
DeletePart(String) |
Deletes the specified child part from this part. (Inherited from OpenXmlPartContainer) |
DeleteParts<T>(IEnumerable<T>) |
Deletes all the parts which are in the passed in collection from the document. (Inherited from OpenXmlPartContainer) |
DeleteReferenceRelationship(ReferenceRelationship) |
Deletes the specified reference relationship. (Inherited from OpenXmlPartContainer) |
DeleteReferenceRelationship(String) |
Deletes the specified reference relationship. (Inherited from OpenXmlPartContainer) |
FeedData(Stream) |
Feeds data into the part stream. The stream of the part will be truncated at first. |
GetExternalRelationship(String) |
Gets the specified ExternalRelationship. (Inherited from OpenXmlPartContainer) |
GetIdOfPart(OpenXmlPart) |
Gets the relationship ID of the part. (Inherited from OpenXmlPartContainer) |
GetParentParts() |
Enumerates all parents that reference this part anywhere in the document. |
GetPartById(String) |
Gets the child part through the relationship ID. (Inherited from OpenXmlPartContainer) |
GetPartsCountOfType<T>() |
Gets the count of all parts of type T. (Inherited from OpenXmlPartContainer) |
GetPartsOfType<T>() |
Enumerates all the children parts of the specified type "T" of this part. (Inherited from OpenXmlPartContainer) |
GetPartsOfType<T>(ICollection<T>) |
Gets all the children parts of the specified type "T" into "partCollection" of this part. (Inherited from OpenXmlPartContainer) |
GetReferenceRelationship(String) |
Gets the specified ReferenceRelationship. (Inherited from OpenXmlPartContainer) |
GetStream() |
Returns the part content data stream. |
GetStream(FileMode) |
Returns the content stream that was opened using a specified I/O FileMode. |
GetStream(FileMode, FileAccess) |
Returns the part content stream that was opened using a specified FileMode and FileAccess. |
RemoveAnnotations(Type) |
Removes the annotations of the specified type from this PartContainer. (Inherited from OpenXmlPartContainer) |
RemoveAnnotations<T>() |
Removes the annotations of the specified type from this PartContainer. (Inherited from OpenXmlPartContainer) |
ThrowIfObjectDisposed() |
Indicates whether the object is already disposed. |
ValidateXml(String, ValidationEventHandler) |
Obsolete.
Validates the XML content of the part by using the specified schema. |
ValidateXml(XmlSchemaSet, ValidationEventHandler) |
Obsolete.
Validates the XML content of the part by using the specified schema. |
Applies to
Feedback
Submit and view feedback for