selecting multiple elements
I am working with an XML file similar to the one below, consisting of many transactions. I'm trying to extract the items that each customer has bought, and generate an email which includes all these items within the body of the mail. The email is working, however, I can only send 4 separate emails (one for each item) with the item in the body. java function for email is like this: send(string to, string from, string subject, string msg) Right now its just passing in the item into the $msg variable one at a time. Can anyone reccommend a way to insert these 4 items into the $msg variable so i can send one mail w/ all 4 items included? <t> <transaction> <customer> <name>Daniel B.</name> <email>chansen1@xxxxxxxxx</email> </customer> <items total="$11.78"> <item>Milk</item> <item>Butter</item> <item>SuperPretzel</item> <item>Paper Towels (Scott's)</item> </items> </transaction> ... <xsl:for-each select="$transactions/transactions//transaction/items/item" > <xsl:variable name="thePerson" select="../../customer/name"/> <xsl:variable name="email" select="../../customer/email"/> <xsl:variable name="msg" select=???'/> <xsl:value-of select="myJava:myMail.send($email,'test@xxxxxx,'Coupon!', $msg)" />
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format