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

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

> 

with⁡XMLTools:

> 

xmlTree≔XMLElement⁡a,,XMLElement⁡b,,b text,XMLElement⁡c,,c text,XMLElement⁡b,,more b text:

> 

Print⁡xmlTree

<a>
  <b>b text</b>
  <c>c text</c>
  <b>more b text</b>
</a>

> 

map⁡Print&comma;GetChildByName⁡xmlTree&comma;b

<b>b text</b>

<b>more b text</b>

(1)
> 

map⁡Print&comma;GetChildByName⁡xmlTree&comma;c

<c>c text</c>

(2)
> 

map⁡Print&comma;GetChildByName⁡xmlTree&comma;nosuchelement

(3)

See Also

XMLTools

XMLTools[GetChild]

XMLTools[HasChild]

XMLTools[Print]

XMLTools[RemoveChild]

XMLTools[XMLElement]