HelperAddXMLElement Method (XmlDocument, XmlElement, String) | |
XML element add to XML document node.
Namespace:
SOWIData.XML
Assembly:
SOWIData.XML (in SOWIData.XML.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax public static XmlDocument AddXMLElement(
this XmlDocument pXMLDocument,
XmlElement pXMLElementToAdd,
string pAddToNode = ""
)
<ExtensionAttribute>
Public Shared Function AddXMLElement (
pXMLDocument As XmlDocument,
pXMLElementToAdd As XmlElement,
Optional pAddToNode As String = ""
) As XmlDocument
Parameters
- pXMLDocument
- Type: System.XmlXmlDocument
XML document - pXMLElementToAdd
- Type: System.XmlXmlElement
XML element add to node - pAddToNode (Optional)
- Type: SystemString
add to Node.
Return Value
Type:
XmlDocument[Missing <returns> documentation for "M:SOWIData.XML.Helper.AddXMLElement(System.Xml.XmlDocument,System.Xml.XmlElement,System.String)"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
XmlDocument. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
If XML element node (pXMLElementToAdd) not exist then this add.
If more exist then add to last element
Examples
This example put parameter
pAddToNodestring lAddToNodeName = typeof(easyPlanData.Interface.IObjekt).FullName.ToString();
lXMLDocument.AddXMLElement<easyPlanData.Interface.IObjekt>(pItem);
lXMLDocument.AddXMLElement<easyPlanData.Interface.IAnlagekennlinie>(pItem.Anlagekennlinie, lAddToNodeName);
See Also