How to Process XML Documents in Object Oriented Concepts

Processing XML Documents in Object Oriented Concepts

Specifically, the foundation of XML schemas is extensional object-oriented technology; the foundation of more conventional languages such as C++ or Java is intentional object-oriented technology. In fact, software that processes XML documents must often process both intentional and extensional objects

The poignant distinction between intentional and extensional objects is that in an intentional language, an instance exists because of instantiation. For example, you might use
’instance = new(class)’
or some other similar syntax. Extensionally, however, an object simply is or is not an instance of a particular class according to whether or not it satisfies the class's "restrictors" Consider, for example, the XML element
. It claims to be an instance of a
element type. Presumably, but not necessarily, the schema contains that element type described by 'taggy
" .../>'. Furthermore, the XML element must satisfy the structure and attribute constraints specified by that element type in order to qualify as an instance

With extensional programming, validation software accepts or rejects potential instances. With intentional programming, an instance is implicitly valid: The software prohibits creation of an instance that does not satisfy the restrictions of its class

In an object-oriented language such as C++ or Java, there is one inheritance mechanism. The derived class has full control of the functionality. New functionality comes from creating new methods or overriding existing ones. In an XML schema, an extension is analogous to creating a method or adding new properties. A restriction compares to overriding an existing method or restricting existing properties. The XML schema language not extensional programming in general prohibits certain derivations that are common in existing intentional languages. For example, schemas do not permit element types in an extension to override (subclass) the corresponding structure type

Related Topic XML Important Terminology in Object Oriented Programming
Servlet Interview Questions & Answers
Servlet Interview Questions & Answers Part 2
Latest Hibernate Interview Questions & Answers
What is OSI Model and its Layers in Communication System
xml schema  XHTML  RSS  XML  OOPs  Java  C++ © 2011   Privacy Policy  Terms of Service  Feedback