1. Trang chủ
  2. » Tất cả

TP5

37 152 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Schemas Chapter 5 Core XML / Chapter 5 / Slide 2 of 29Summary-1DOM stands for Document Object Model. It is a way by which, we can treat a document as an object, and extract information, make changes, and query the document through code. The three types of Document Models supported in XML are: Linear Model which is applied to static documents, Tree Model which is applied to dynamic documents and the Object Model where each and every element is considered as a object.The set of methods, which helps us to build complex documents from scratch, are called factory methods. Core XML / Chapter 5 / Slide 3 of 29Summary-2XML DOM programming can be classified into two types of objects:•XML DOM Base Object•DOM ObjectsThe XML DOM Base Object is used to support namespaces, data types, XML Schemas, XSL operations, asynchronous loading and to save documents.DOM Objects are used to represent implementations of the XML DOM interfaces.The DOM Document object represents the top level of the XML source. It includes methods and properties used to obtain or to create all other XML objects. Core XML / Chapter 5 / Slide 4 of 29Summary-3The object ‘XMLDOMNode’ extends the core XML DOM node interface. Most of the other DOM objects inherit the XMLDOMNODE object.The ‘XMLDOMNodeList’ object is a collection of nodes. Its methods allow us to iterate through all the children nodes of a node.The ‘XMLDOMNamedNodeMap’ objects can be accessed by an index. This index does not that the XML DOM specifies an order to these nodes. It is used to iterate through the attributes for a specific element.The ‘XMLDOMParseError’ object returns information about the last parse error. The information includes the error number, line number, character position, and a text description.The ‘XMLDOMAttribute’ object represents an attribute of an element. Attributes are properties of an element and not the child nodes of the element. Core XML / Chapter 5 / Slide 5 of 29Summary-4The ‘XMLDOMCDATASection’ object represents the content of the CDATA section. The ‘XMLDOMDocumentType’ object contains information about all the entities and notations in a declared document type declaration of the XML file. The ‘XMLDOMEntity’ object represents a parsed or unparsed entity in the XML document. The XMLDOMEntity object represents the entity itself, rather than the entity declaration.The ‘XMLDOMProcessingInstruction’object represents a processing instruction. The content of the XMLDOMProcessingInstruction node is the entire content within the delimiters of the processing instruction (PI). Core XML / Chapter 5 / Slide 6 of 29Summary-5The Simple API for XML (SAX) is a set of APIs for working with XML. SAX does not consume much memory. It is used frequently in server side applications, as it is fast. SAX Interfaces are used to provide support for various languages.DOM and SAX are the two most popular APIs for manipulating XML documents. The two APIs differ in their origination, scope and in programming style. Both the APIs have their own strengths and weaknesses. Core XML / Chapter 5 / Slide 7 of 29ObjectivesDefine schemaDistinguish between a schema and DTDCreate schema using XML schema vocabularyIdentify the elements in an XML schemaDescribe validation and constraintsExplain element inheritance in an schema Core XML / Chapter 5 / Slide 8 of 29SchemasSchemasRulesA model for a whole class of documentsOrganization1Organization2Common vocabularySchemasExchanging documents Core XML / Chapter 5 / Slide 9 of 29Limitations of DTDDTDs are written in a non-XML syntax.DTDs are not extensible.They have no support for namespaces.They only offer extremely limited data typing. Core XML / Chapter 5 / Slide 10 of 29XML Schema New FeaturesXML syntax is used as the basic for creating XML schema documentsXML schemas can be passed and manipulated just like any other XML document.Richer data typesArchetypesAttributes groupingRefinable archetypes 123doc.vn

Ngày đăng: 12/01/2013, 15:44

Xem thêm