Actually, it's even easier than that.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data">
<thing id="cElmSpSCM" name="Elemental Spell" description="When you cast a spell that deals a type of damage from the following list, you can spend 1 sorcery point to change that damage type to one of the other listed types: acid, cold, fire, lightning, thunder. If a wild sorc, roll d20. If 5 or below, determine dmg type randomly. If affected by Tides of Chaos, always randomly determine dmg type." compset="CustomSpec" summary="Spend 1 sorc. pt.: Choose dmg type from 5 elements." uniqueness="unique">
<usesource source="p5eSorUACVAP"/>
<tag group="Helper" tag="Secondary" name="Secondary" abbrev="Secondary"/>
<tag group="SpecSource" tag="cHelpSor" name="Sorcerer" abbrev="Sorcerer"/>
<tag group="abAction" tag="Free" name="Free" abbrev="Free"/>
<tag group="abCategory" tag="SorMetamag" name="Sorcerer Metamagic Ability" abbrev="Sorcerer Metamagic Ability"/>
<tag group="abDuration" tag="Instant" name="Instantaneous" abbrev="inst"/>
<tag group="abRange" tag="Personal" name="Personal" abbrev="pers"/>
<bootstrap thing="cUAExSpLt">
<autotag group="ClSpecWhen" tag="1"/>
</bootstrap>
</thing>
<thing id="cUAExSpLt" name="Expanded Spell List" description="You must otherwise obey all the restrictions for selecting the spell, and it becomes a sorcerer spell for you.\n\n" compset="ClSpecial">
<usesource source="p5eSorUACVAP"/>
<eval phase="Final" priority="21000"><![CDATA[doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.Disable] <> 0)
~these vars will hold the tag expressions for spells and cantrips
var cantrip as string
var spell as string
var known as string
var first as string
var second as string
var third as string
var fourth as string
var sixth as string
var eigth as string
var ninth as string
~ fetch spell expressions
spell = hero.childfound[cHelpSor].field[cSpKnoExpr].text
known = hero.childfound[cHelpSor].field[cSpellExpr].text
~ these receive the extra spells for each circle
cantrip = " | thingid.sp5CXGEPrS "
first = " | thingid.spGrease | thingid.spProtGoEv "
second = " | thingid.spFlamBlad | thingid.spFlamSphe "
third = " | thingid.spVampTouc "
fourth = " | thingid.spFireShie "
sixth = " | thingid.spFlesSton "
eigth = " | thingid.spDemiplan "
ninth = " | thingid.spForesigh "
hero.childfound[cHelpSor].field[cCnKnoExpr].text &= cantrip
spell &= first
known &= first
spell &= second
known &= second
spell &= third
known &= third
spell &= fourth
known &= fourth
spell &= sixth
known &= sixth
spell &= eigth
known &= eigth
spell &= ninth
known &= ninth
hero.childfound[cHelpSor].field[cSpKnoExpr].text = spell
hero.childfound[cHelpSor].field[cSpellExpr].text = known
hero.childfound[cHelpSor].field[cSplBkExpr].text = known]]></eval>
</thing>
</document>
You could even run all the spells into one massive string but this is spaced out for readablity