Class CustomXMLNode
Represents the custom XML node in the custom XML part.
Inheritance
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Portable.dll
Syntax
public class CustomXMLNode : Object
Properties
ChildNodes
Declaration
public IEnumerable<CustomXMLNode> ChildNodes { get; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<CustomXMLNode> |
FirstChild
Declaration
public CustomXMLNode FirstChild { get; }
Property Value
Type |
---|
CustomXMLNode |
LastChild
Declaration
public CustomXMLNode LastChild { get; }
Property Value
Type |
---|
CustomXMLNode |
OwnerPart
Declaration
public CustomXMLPart OwnerPart { get; }
Property Value
Type |
---|
CustomXMLPart |
ParentNode
Gets the parent element node of the current node.Read-only.
Declaration
public CustomXMLNode ParentNode { get; }
Property Value
Type |
---|
CustomXMLNode |
Text
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
XML
Declaration
public string XML { get; }
Property Value
Type |
---|
System.String |
XPath
Declaration
public string XPath { get; }
Property Value
Type |
---|
System.String |
Methods
AppendChildNode(String, CustomXMLNodeType, String)
Appends a single node as the last child of the current node
Declaration
public void AppendChildNode(string name, CustomXMLNodeType nodeType, string nodeValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The string that specifies the name |
CustomXMLNodeType | nodeType | The node type |
System.String | nodeValue | The string that specifies the value for the node |
Delete()
Deletes the current node from the tree (including all of its children, if any exist).
Declaration
public void Delete()
Examples
The following code illustrates how to delete CustomXMLNode from its parent.
HasChildNodes()
Declaration
public bool HasChildNodes()
Returns
Type |
---|
System.Boolean |
RemoveChild(CustomXMLNode)
Removes the specified child node (and its subtree) from the main tree.
Declaration
public void RemoveChild(CustomXMLNode child)
Parameters
Type | Name | Description |
---|---|---|
CustomXMLNode | child | CustomXMLNode to be removed. |
Examples
The following code illustrates how to remove child nodes of the CustomXMLNode
SelectSingleNode(String)
Selects a single node from a collection matching an XPath expression.
Declaration
public CustomXMLNode SelectSingleNode(string xPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | xPath | Xpath of CustomXMLNode to be selected. |
Returns
Type | Description |
---|---|
CustomXMLNode | Returns the node from a collection matching an XPath expression. |
Examples
The following code illustrates how to select single node from CustomXMLNode based on XPath