[[xmlGetText Talk Page|Discuss this page]] === xmlGetText === ^ Syntax | (xmlGetText xml index) -> xml | ^ Arguments | xml: The XML element to get the text data from | ^ | index: The 0-based index of the text to get | ^ Returns | The block of text at the specified index in **xml** | ^ Category | [[XML functions | XML]]| ^ Description | "Text" refers to whatever is not part of the XML tags or subelements. This includes the TLisp code contained inside Event elements. Indexes are separated by subelements | ===Explanation=== Consider the following XML data: "hugoSandovalMission" "Hugo Sandoval" &svCommonwealth; True (rpgCharacterAscend &unidHugoSandoval;) Now consider the following code: (block (theXML theXMLText0 theXMLText1 theXMLText2 theStaticData theDataText0 theDataText1 theDataText2) (setq theXML (typGetXML &unidHugoSandoval;)) (setq theXMLText0 (xmlGetText theXML 0)) (setq theXMLText1 (xmlGetText theXML 1)) (setq theXMLText2 (xmlGetText theXML 2)) (setq theStaticData (xmlGetSubElement theXML 'StaticData)) (setq theDataText0 (xmlGetText (xmlGetSubElement theStaticData 0) 0)) (setq theDataText1 (xmlGetText (xmlGetSubElement theStaticData 1) 0)) (setq theDataText2 (xmlGetText (xmlGetSubElement theStaticData 2) 0)) ) * **theXML** is equal to the XML defined above. * **theXMLText0** is the space between **** and **** * **theXMLText1** is the space between **** and **** * **theXMLText2** is the space between **** and **** * **theDataText0** is **"hugoSandovalMission"** * **theDataText1** is **"Hugo Sandoval"** * **theDataText2** is **&svCommonwealth;** [[modding:xml|XML]] Return to [[modding:function:xml_functions|XML Functions]] list Return to [[:Functions]] list