Adds additional XPath patterns to be run on each element and assigned to a metadata key.
To be safe, these patterns should start with "./" so they scope only to the element.
The InnerXml of the first matching node will be used as the value of the metadata.
- Namespace
- Statiq.Core
- Containing Type
- ReadXml
Syntax
public ReadXml WithMetadataXPath(string key, string xpath)
Parameters
Name |
Type |
Description |
key |
string |
The metadata key to store the value in. |
xpath |
string |
The XPath expression for the additional metadata. |
Return Value
Type |
Description |
ReadXml |
The current module instance. |