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

Online Help

All Products    Maple    MapleSim


XMLTools

  

CleanEntities

  

remove _XML_Entity in favor of encoded text

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

CleanEntities(xmlTree)

Parameters

xmlTree

-

Maple XML tree; XML element

Description

• 

The CleanEntities(expr) command returns an equivalent xmlTree with the _XML_Entity elements removed and replaced with encoded text.  If no entity conversion is found, the _XML_Entity will still be replaced, but with an unconverted string.

Examples

> 

with⁡XMLTools:

> 

xml≔ParseString⁡<tag>Capital Π is different than π</tag>

xml≔_XML_Document⁡_XML_Element⁡_XML_ElementType⁡tag&comma;&comma;_XML_Text⁡Capital &comma;_XML_Entity⁡Pi&comma;_XML_Text⁡ is different than &comma;_XML_Entity⁡pi

(1)
> 

CleanEntities⁡xml

_XML_Document⁡_XML_Element⁡_XML_ElementType⁡tag&comma;&comma;_XML_Text⁡Capital Π is different than π

(2)
> 

xml≔ParseString⁡<tag>The number 쾀 is approximately 3.14</tag>

xml≔_XML_Document⁡_XML_Element⁡_XML_ElementType⁡tag&comma;&comma;_XML_Text⁡The number &comma;_XML_Entity⁡#xcf80&comma;_XML_Text⁡ is approximately 3.14

(3)
> 

CleanEntities⁡xml

_XML_Document⁡_XML_Element⁡_XML_ElementType⁡tag&comma;&comma;_XML_Text⁡The number π is approximately 3.14

(4)

Compatibility

• 

The XMLTools[CleanEntities] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

XMLTools

XMLTools[XMLEntity]