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

Online Help

All Products    Maple    MapleSim


XMLTools

  

AttrCont

  

split an XML element into its attributes and content

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

AttrCont(xmlTree)

Parameters

xmlTree

-

Maple XML tree; XML element

Description

• 

The AttrCont(xmlTree) command separates the attributes and content of an XML element and returns them in an expression sequence of two lists. The first list is a list of equations that represent the attributes, each of whose left and right sides are strings. The second list is a list of expressions that represent the content where each of the expressions is of one of the types function or string.

• 

Except for efficiency, the call AttrCont(xmlTree) is equivalent to using Attributes(xmlTree), ContentModel(xmlTree). When both the content model and the attributes are required, it is more efficient to call AttrCont than to use Attributes and ContentModel individually.

Examples

withXMLTools:

xmlTreeXMLElementa,colour=red,XMLElementb,size=2,some text,more text

xmlTree_XML_Element_XML_ElementTypea,_XML_Attribute_XML_AttrNamecolour,_XML_AttrValuered,_XML_Element_XML_ElementTypeb,_XML_Attribute_XML_AttrNamesize,_XML_AttrValue2,_XML_Textsome text,_XML_Textmore text

(1)

AttrContxmlTree

_XML_Attribute_XML_AttrNamecolour,_XML_AttrValuered,_XML_Element_XML_ElementTypeb,_XML_Attribute_XML_AttrNamesize,_XML_AttrValue2,_XML_Textsome text,_XML_Textmore text

(2)

See Also

XMLTools

XMLTools[Attributes]

XMLTools[ContentModel]