XML for Scientific Applications Marlon Pierce ERDC Tutorial

XML for Scientific Applications Marlon Pierce ERDC Tutorial

XML for Scientific Applications Marlon Pierce ERDC Tutorial August 16 2001 What is XML? Standard rule set for defining custom tags. Make your (meta)data human-readable. Separate data content from presentation (XSL). Rules for a particular dialect defined in either DTD or Schema.

W3C: Standards Making Body Same people that produced HTML. See http://www.w3c.org XML for E&M Input Data Ex: XML for Electricity and Magnetism

2 Tags omitted for brevity balloon.dat ASCII P3D none

Tags omitted for brevity EX: E&M DTD Fragment Cut for brevity.

What the DTD Tells You What tags can be included Parent/child relationships The number of allowed tags of a particular type 1 only, 0 or 1, 0 or more, 1 or more. Names of attributes

If the tag takes parsable character data Ex: E&M Schema Fragment

. Schema v. DTD (a partial list) Schemas are in XML; DTDs are not. Schemas have several simple types (integers, strings, floats, ); DTDs treat

everything as character data. Schema complex types support inheritance Bee complex type can be extended by drone, queen, worker subtypes. But DTDs have been around longer. Now What? Get a parser for your favorite language Apache XML Projects Xerces parser supports Java, C++, Perl

http://xml.apache.org Write code using the parser: Validates XML files. Returns the DOM. You can now navigate the XML document tree Document Object Model Defines general entities that make up the document.

Forms a tree Objects include Document Node Element Attribute

ProjectDesc GridData MaterialList Practical Drawbacks The DOM classes are very general. They only provide you with the most general way of navigating the tree.

Typically for every XML dialect you create, you will have to write new code to extract the information. It would be nice if there was a better way to do this. Automatic JavaBeans with Castor XML trees map nicely into Java Bean components. Get/Set methods return the information.

Castor: automatically generates JavaBeans from XML and vice versa. You just write the Bean classes (simple) and Castor handles the mapping to XML. http://castor.exolabs.org Some Standard XML Dialects Dont reinvent what already exists. See http://www.w3c.org/TR MathML ChemistryML

SVG: Scalable Vector Graphics SOAP: Simple Object Access Protocol RDF: Resource Description Framework Scientific Visualization with SVG XML Namespaces Namespaces allow you to mix different types of XML. You can combine custom and standard tags

Ex: combine GEMML plus MathML Namespace Example

Additional References and Resources Inside XML by Steven Holzner. New Riders (2001). The W3C has a nice schema tutorial at www.w3.org/TR/xmlschema-0/ The ARL ICE project mixes XML and HDF5: www.arl.hpc.mil/ice/XdmfUser.html XSIL is a markup language for scientific

data: www.cacr.caltech.edu/SDA/xsil

Recently Viewed Presentations

  • Project 13632 - EDGE

    Project 13632 - EDGE

    Project 13632. Process Control Flow Cart: Heat Exchange Temperature Control Loop. Amanda Doucett, Dan Sacchitella, Jay Moseley, Micah Bitz, Marc Farfaglia, Rebecca Davidson
  • Aristotle's Conclusion Time and Space

    Aristotle's Conclusion Time and Space

    Aristotle's Conclusion Time and Space. Aristotle lived in Greece more than three hundred years before the Common Era (or Before Christ). In Aristotle's time, most people believed that many gods ruled the universe.
  • Edwin Muir - Ms Kenny

    Edwin Muir - Ms Kenny

    The poem reflects Muir's awe at the sight of horses in a field. He mainly recites the poem retrospectively, meaning he is looking back on his past experiences. For him, the fading light of dusk and the muscular bodies of...
  • Biodiversity - Twinsburg

    Biodiversity - Twinsburg

    A World Rich in Biodiversity. Biodiversity,is the variety of organisms in a given area, the genetic variation within a population, the variety of species in a community, or the variety of communities in an ecosystem.. Certain areas of the planet,...
  • Learning Theories Sarah Harris EME 2040-5499 How Do

    Learning Theories Sarah Harris EME 2040-5499 How Do

    Constructivism Bruner's theory emphasizes instruction based on the study of cognition and linked to child development research as well as social and cultural aspects of learning Instructor must encourage learner to discover concepts on their own Instruction must make the...
  • Project Development of a Career Pathway for District

    Project Development of a Career Pathway for District

    www.nursingandmidwiferycareersni.hscni.net. This project was Chaired by Nicki Patterson EDoN South Eastern Trust and the Career Pathway Website was launched at NIPEC's conference in September 2015. Nicki leads a regional governance Group, with representation from each of the Trusts Independent Sector,...
  • 2010 Marcellus Summit: Building a Sustainable Future Penn

    2010 Marcellus Summit: Building a Sustainable Future Penn

    Haynesville Top Drive Rig Drilling On Left & Adjacent Well Undergoing Hydraulic Fracture Stimulation (right) AQUAPURE, 2008. Gary Hanson, 2009. Gary Hanson, 2009. Haynesville Shale Gas Discovered in Northwest Louisiana - 2008. EnCana frac job underway.
  • Literary devices - Rhea M. Hebert

    Literary devices - Rhea M. Hebert

    Mood is a created feeling in the work. Mood is created used various other literary devices such as images, alliteration, specific details, irony, satire, color, etc. Mood is often related to how you feel about the story, poem, film, etc....