Since XML isn't case-sensitive, I've been having trouble using (find) with the resulting string that contains the XML code.
For example, in trying to determine whether an item marked as a missile actually contains the <Missile> element, which determines whether it can be fired by a launcher without adding additional code to the missile, I've been using (find missileXML "issile>") to search for the end tag. While this method handles </Missile> and </missile> correctly, it won't handle </MISSILE>, </mIsSle>, or other variants correctly.
Is there a function that will capitalize all the letters in a string but leave the rest of the characters alone? Alternatively, is there support for wildcard searches using Transcendence lisp?
Thanks if anyone can help!
Code: Select all
(setq missileCode "")
(setq missileNames "")
(enum (itmGetTypes "m") missileUNID
(block Nil
(setq missileCode (cat missileCode "<Missile ammoID=\"" missileUNID "\" />"))
(setq missileXML (typGetXML missileUNID))
(if (find missileXML "issile>")
(setq isMissile "Ready to fire")
(setq isMissile "NOT ready to fire")
)
(setq missileNames
(cat
missileNames
" "
(itmGetName (itmCreate missileUNID 1) 0)
isMissile
)
)
)
)