1 / 16

3 Kinds of Libraries

3 Kinds of Libraries. And some reflections on libraries in general. As you arrive… please sit with your Tivoo groups. In Class Today. Libraries for parsing XML Libraries for dealing with Dates Libraries for outputting HTML Reflections. Libraries for XML. DOM - Document Object Model

giolla
Télécharger la présentation

3 Kinds of Libraries

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3 Kinds of Libraries And some reflections on libraries in general As you arrive…please sit with your Tivoo groups

  2. In Class Today • Libraries for parsing XML • Libraries for dealing with Dates • Libraries for outputting HTML • Reflections

  3. Libraries for XML • DOM - Document Object Model • SAX - Simple API for XML • JDOM - “a Java-based document object model for XML files” XPath – an added bonus

  4. Parsing with DOM

  5. Parsing with SAX

  6. Parsing with JDOM

  7. XPath

  8. In Class Today • Libraries for parsing XML • Libraries for dealing with Dates • Libraries for outputting HTML • Reflections

  9. Unix Epoch Time and “Human” Views of Time http://coolepochcountdown.com/ Sunday, November 4, 2012, 1:59am. What’s wrong with converting the above date to epoch time?

  10. Java’s Built in Calendar class

  11. Joda’sParsing Or for more fancy formatting…

  12. In Class Today • Libraries for parsing XML • Libraries for dealing with Dates • Libraries for outputing HTML • Reflections

  13. gagawa

  14. JSP

  15. In Class Today • Libraries for parsing XML • Libraries for dealing with Dates • Libraries for outputting HTML • Reflections

  16. Reflections on Libraries • It’s usually not a good idea to hand-parse a standard format (unless you’re really looking for quick-n-dirty) • In Java, there’s almost always a “built in” way to do what you want • Using libraries has a cost, so you almost never want to use them if the code you’d be replacing is small • But do make your coding a pleasure

More Related