background preloader

XML

Facebook Twitter

XML Schema Part 0: Primer Second Edition. 1 Introduction This document, XML Schema Part 0: Primer, provides an easily approachable description of the XML Schema definition language, and should be used alongside the formal descriptions of the language contained in Parts 1 and 2 of the XML Schema specification.

XML Schema Part 0: Primer Second Edition

The intended audience of this document includes application developers whose programs read and write schema documents, and schema authors who need to know about the features of the language, especially features that provide functionality above and beyond what is provided by DTDs. The text assumes that you have a basic understanding of XML 1.0 and Namespaces in XML. Each major section of the primer introduces new features of the language, and describes those features in the context of concrete examples. Basic Concepts: The Purchase Order (§2) covers the basic mechanisms of XML Schema. 2 Basic Concepts: The Purchase Order Let us start by considering an instance document in a file called po.xml. 2.1 The Purchase Order Schema. Основы XML Scheme. XML-схема обладает более мощными возможностями, чем DTD. Для иллюстрации преимуществ использования механизма XML-схем в первых трех листингах сравниваются различные способы представления элементов.

В Листинге 1 представлена выдержка из XML-документа. В Листинге 2 показаны два элемента, объявленные в синтаксисе DTD, а в Листинге 3 представлен синтаксис, соответствующий XML-схеме. Обратите внимание, что синтаксис в Листинге 3 подобен синтаксису XML. При использовании схемы, валидирующий парсер может выполнить проверку, является ли элемент InvoiceNo положительным целым числом, и состоит ли ProductID из заданного набора символов (шести цифр и одной буквы от A до Z). Листинг 1: Фрагмент XML-документа Листинг 2: Фрагмент DTD, описывающий элементы из Листинга 1 Листинг 3: Фрагмент XML-схемы, описывающий элементы из Листинга 1 Использование пространств имен в XML-схеме Имена, определенные в схеме принадлежат так называемому целевому пространству имен .

Рисунок 1: Пространства имен для Листинга 4. JAXB Tutorial. JAXP Tutorial. The Java API for XML Processing (JAXP) trail provides an introduction to Java API for XML Processing (JAXP) 1.4 technology, via examples of JAXP applications.

JAXP Tutorial

To make full use of the information in the Java API for XML Processing (JAXP) Tutorial, you should have knowledge of the following technology: The Java programming language and its development environment.The eXtensible Mark-up Language (XML)The Document Object Model (DOM), as defined by the World Wide Web Consortium (W3C) DOM Working Group.Simple API for XML (SAX), as developed cooperatively by the members of the XML-DEV mailing list. Some prior knowledge of DOM and SAX is assumed. Only code that is specific to the JAXP API is examined in detail in this tutorial. Introduction to JAXP provides a brief description of the JAXP technology, including its purpose and principal features.

Streaming API for XML focuses a streaming Java technology-based, event-driven, pull-parsing API for reading and writing XML documents. Java API for XML Code Samples. Oracle Technology Network > Java Software Downloads View All Downloads Top Downloads New Downloads What's New Java in the Cloud: Rapidly develop and deploy Java business applications in the cloud.

Java API for XML Code Samples

Essential Links Developer Spotlight Java EE—the Most Lightweight Enterprise Framework? Blogs Technologies Contact Us About Oracle Cloud Events Top Actions. J2EE Tutorial.