XMLTools
GetChildByName
access a child node of an XML tree
Calling Sequence
Parameters
Description
Examples
GetChildByName(xmlTree, name)
xmlTree
-
Maple XML tree; XML element
name
string or symbol; the name of the child element to extract
The GetChildByName(xmlTree, name) command accesses the children of the given XML element xmlTree with element name equal to name. A list of all children that are elements with element type equal to name is returned.
withXMLTools:
xmlTree≔XMLElementa,,XMLElementb,,b text,XMLElementc,,c text,XMLElementb,,more b text:
PrintxmlTree
<a> <b>b text</b> <c>c text</c> <b>more b text</b> </a>
mapPrint,GetChildByNamexmlTree,b
<b>b text</b> <b>more b text</b>
mapPrint,GetChildByNamexmlTree,c
<c>c text</c>
mapPrint,GetChildByNamexmlTree,nosuchelement
See Also
XMLTools[GetChild]
XMLTools[HasChild]
XMLTools[Print]
XMLTools[RemoveChild]
XMLTools[XMLElement]
Download Help Document