Class CompiledPackageXmlParser
Parses the XML document contained in a compiled (zip) Umbraco package.
Inheritance
object
Namespace: Umbraco.Cms.Core.Packaging
Assembly: Umbraco.Core.dll
Syntax
public class CompiledPackageXmlParser
Constructors
View SourceCompiledPackageXmlParser(ConflictingPackageData)
Initializes a new instance of the CompiledPackageXmlParser class.
Declaration
public CompiledPackageXmlParser(ConflictingPackageData conflictingPackageData)
Parameters
| Type | Name | Description |
|---|---|---|
| ConflictingPackageData | conflictingPackageData | The service used to detect conflicting package data. |
Methods
View SourceToCompiledPackage(XDocument)
Converts an XML document to a CompiledPackage model.
Declaration
public CompiledPackage ToCompiledPackage(XDocument xml)
Parameters
| Type | Name | Description |
|---|---|---|
| XDocument | xml | The XML document representing the package. |
Returns
| Type | Description |
|---|---|
| CompiledPackage | A CompiledPackage instance containing the parsed package data. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
| InvalidOperationException | Thrown when the XML document is invalid. |
| FormatException | Thrown when the XML document format is not a valid Umbraco package. |