GetChildByName - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


XMLTools

  

GetChildByName

  

access a child node of an XML tree

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GetChildByName(xmlTree, name)

Parameters

xmlTree

-

Maple XML tree; XML element

name

-

string or symbol; the name of the child element to extract

Description

• 

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.

Examples

withXMLTools:

xmlTreeXMLElementa,,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&comma;GetChildByNamexmlTree&comma;b

<b>b text</b>

<b>more b text</b>

(1)

mapPrint&comma;GetChildByNamexmlTree&comma;c

<c>c text</c>

(2)

mapPrint&comma;GetChildByNamexmlTree&comma;nosuchelement

(3)

See Also

XMLTools

XMLTools[GetChild]

XMLTools[HasChild]

XMLTools[Print]

XMLTools[RemoveChild]

XMLTools[XMLElement]