This task takes XML strings or XML documents as inputs, which will be then combined to form a one huge XML according to the following rules and parameters.
Input Parameters
- xmlRootElementName
- Name for the root element
Input
- The object that is combined. Input can be given in the following formats:
- XML as a C# String
- C# XmlDocument
- The object that is combined. Input can be given in the following formats:
- ChildElementName
- Name for the child element that the input is written into.
Output Result
String
- A string containing the new combined XML document
Example Usage
For example calling this task with the following settings:
xmlRootElementName: "Foo" Input: "<?xml version=\"1.0\" encoding=\"utf-8\"?><bar>foo</bar>" ChildElementName: "Bar0" Input: "<?xml version=\"1.0\" encoding=\"utf-8\"?><foo>bar</foo>" ChildElementName: "Bar1"
Will produce the following XML document:
"<?xml version="1.0" encoding="utf-8"?><Foo><Bar0><bar>foo</bar></Bar0><Bar1><foo>bar</foo></Bar1></Foo>"