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

  • The Age of Absolutism and the Age of Revolutions

    The Age of Absolutism and the Age of Revolutions

    The Ancient Near East Hist 121: Western Civilization I Clayton Miles Lehmann Ashfall Fossil Beds. 10 million YBP Lascaux, Hall of the Bulls. 15,000 YBP Greek neolithic pot.
  • Explorations in Music, The Arts, and Ideas- "On the ...

    Explorations in Music, The Arts, and Ideas- "On the ...

    Explorations in Music, The Arts, and Ideas- "On the Relationship of Analytical Theory to Performance and Interpretation" Eugene Narmour - University of Pennsylvania Arpi Mardirossian Wednesday, April 30, 2003 Introduction Music theory should teach how different interpretations alter the listener's...
  • Financing methods - Bauer College of Business

    Financing methods - Bauer College of Business

    Financing Growth. Public corporations have access to public equity markets. Debt and equity are a very important source of capital. Debt has become historically cheap due to the low levels of interest rates. Several corporations take advantage of these low...
  • INVESTIGATION: Making Glue

    INVESTIGATION: Making Glue

    INVESTIGATION: Insect Collection CONCLUSION (one full paragraph): Summarize what you learned. What do all your drawings or all the insects have in common?
  • Court Technology and Court Performance - UMass Lowell

    Court Technology and Court Performance - UMass Lowell

    Court Technology and Court Performance ... violence court technology application and resource link Community Courts and Restorative Justice What is restorative justice? Adversarial vs. Resolution-based Court Processes: How and why are they different? Offender, Victim, and Community: can they co...
  • CS151 Lecture 1

    CS151 Lecture 1

    April 9, 2019. Nondeterminism . NTIME(f(n)) = languages decidable by a multi-tape NTM that runs for at most f(n) steps . on any computation path, where n is the input length, and f :
  • Tin Whisker Risk Model Spreadsheet - web.calce.umd.edu

    Tin Whisker Risk Model Spreadsheet - web.calce.umd.edu

    Introduction. The Whisker Risk Model Spreadsheet can be used to calculate the expected number of tin whisker shorts on one or more leaded components, based on user-specified part and lead geometry, whisker density, whisker length distribution, applied voltage, and conformal...
  • Engineering/Technology Curriculum Development for High School ...

    Engineering/Technology Curriculum Development for High School ...

    Introduction " Engineering is the profession in which a knowledge of the mathematical and naturalsciences gained by study, experience, and practice is applied with judgment to develop ways to utilize, economically, the materials and forces of nature for the benefit...