Usage
-
Xml()Creates new documents from input documents. The child elements of the root element will be used.
-
Xml(string itemXPath)Creates new documents from input documents.
itemXPathThe XPath expression to use to find child items. If null, all child elements will be used.
-
Xml(string data, string itemXPath)Creates new documents from the specified XML data.
dataThe XML data.
itemXPathThe XPath expression to use to find child items. If
null, all child elements will be used.
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
AddKeyConversion(string originalKeyName, string newKeyName)Allows renaming of keys during document creation: "If you find key X, create it as key Y instead."
originalKeyNameThe name of the original key to convert.
newKeyNameThe name you want to convert the key to.
-
ExcludeKeys(params string[] keys)Allows creation of a list of keys to discard.
keysThe keys to discard.
-
IncludeKeys(params string[] keys)Allows creation of a list of keys to keep. If this list any members, any keys other than those in this list will be discarded.
keysThe keys to keep.
-
WithContentKey(string contentKey)Specifies which metakey should be used for the document content
contentKeyThe name of the content property.
-
WithItemXPath(string itemXPath)Sets the XPath expression to use to find child items. If null, all child elements will be used.
itemXPathThe XPath expression to use.
-
WithLimit(int limit)Limits the number of created documents.
limitThe number of objects to create documents from.
-
WithMetadataXPath(string key, string xpath)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.
keyThe metadata key to store the value in.
xpathThe XPath expression for the additional metadata.
