Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7XML11-16-2011Opening DiscussionDo you have any questions about the quiz?Minute essay comments:Turn in assignment #3 before class on Monday after Thanksgiving.Discrete enrollment.In other languages XML is more of a pain, but still not as bad as writing your own parser.Am I a Mac or Windows person?General usefulness of XML.Approach for flat text → XML.MoreXML in browsers.Fraction of sites using XHTML?Why does Scala reorder attributes? Should never cause problems.Using \ and \\Use the \ operation on a node to search for the occurrences of something at the top level.The second argument is a string.Normal string searches for tags with that label.If the string starts with @ it searches for attributes.Use \\ to search deeply.Writing XMLWe saw you can put XML directly into Scala code.If you put in curly braces, you can next Scala code in the XML.<student name={name}> {grades.map(g => <grade value={g.toString}/>)}</student>Properties much be strings.XML.save(filename:String, node:Node)CodeLet's keep working with the code for storing student data in XML.Minute EssayWhen would you not want to use
View Full Document