Chapter 2. Working with XML
In this chapter, I cover the essential technical details you will need to work with XML documents. I also devote a section to learning the powerful XPath language, which you can use to flexibly search XML documents.
Creating and Validating XML
Building on the high-level overview in Chapter 1, here we drill down in more detail to some of the specifics of working with XML documents.
Creating Your Own XML Vocabularies
As we saw in the examples in
Chapter 1, XML can represent virtually any kind of
structured information. A coherent set of elements and attributes
that addresses a particular application need is called an
XML vocabulary. The elements and attributes are
the “words” in the vocabulary that enable communication
of information on a certain subject. An XML vocabulary can be as
simple as a single element—for example a
<Task>
, or can contain as many elements and
attributes as you need. An example document that uses the
<Task>
vocabulary looks like this:
<Task Name="JDeveloper 3.1"> <Task Name="Improved XML Support"> <Task Name="Syntax-Check XML/XSL" Dev="Steve"/> <Task Name="Color-Coded Editing" Dev="Yoshi"/> <Task Name="Run XSQL Pages" Dev="Bret"/> </Task> <Task Name="Improved Debugging Support"> <Task Name="Remote Debugging"> <Task Name="JServer Debugging" Dev="Jimmy"/> <Task Name="Apache JServ Debugging" Dev="Liz"/> </Task> </Task> </Task>
One of the big attractions about working with XML is its low cost of admission. The specification is free to be ...
Get Building Oracle XML Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.