Articles of level

Successful candidates should recognize this as one of the most basic applications of XSLT. If they are not able to construct a reply similar to the example below, they should at 

least be able to identify the components necessary for this operation: xsl:template to match the appropriate XML element, xsl:value-of to select the attribute value, and the optional 
xsl:apply-templates to continue processing the document.

There are many benefits of using XML on the Web :

Information coded in XML is easy to read and understand, plus it can be processed easily by computers.


XML is a W3C standard, endorsed by software industry market leaders.


There is no fixed set of tags. New tags can be created as they are needed.

When you are working with the DOM4J, there are several methods you will use often - - Build the DOM4J document from the xml source.
Document.getRootElement() - Get the root element of the XML.
Element.node(index) - Get the XML node at particular index in the element.
Element.attributes() - Get all the attributes of an element.
Node.valueOf(@Name) - Get the value of an attribute with given name of the element.

The DOM4J defines several Java classes. Here are the most common classes -

Document - Represents the entire XML document. A Document object is often referred to as a DOM tree.
Element - Represents an XML element. Element object has methods to manipulate its child elements,its text, attributes and namespaces.
Attribute - Represents an attribute of an element. Attribute has method to get and set the value of attribute. It has parent and attribute type.
Node - Represents Element, Attribute or ProcessingInstruction

From a start tag to end tag everything you see in a XML document, is XML element. It can contain other elements, attributes and texts.

 XSLT: Extensible Stylesheet Language Transformation to know about XSLT, we should have the basic idea of following.
There are three languages in XSL family,
XSL Transformations(XSLT): XML language for transforming XML Documents.
XSl  Formatting Objects (XSL-FO):XML language for specifying the visual formatting of an XML document.
XML Path Language (XPATH): a non XML language used by XSLT, and also available for use in non-XSLT contexts, for addressing the parts on an XML document.

Reading Xml with JQuery is an easier approach if we have interest on the usage of client-side script as this script does not post back the whole page to the server and hence, speed the network performance.

All white-space, including line breaks, TAB characters, and normal spaces, even between ?structural? elements where no text can ever appear, is passed by the parser unchanged to the application (browser, formatter, viewer, converter, etc), identifying the context in which the white-space was found (element content, data content, or mixed content, if this information is available to the parser, eg from a DTD or Schema). This means it is the applications responsibility to decide what to do with such space, not the parser:
► insignificant white-space between structural elements (space which occurs where only element content is allowed, ie between other elements, where text data never occurs) will get passed to the application (in SGML this white-space gets suppressed, which is why you can put all that extra space in HTML documents and not worry about it)
► significant white-space (space which occurs within elements which can contain text and markup mixed together, usually mixed content or PCDATA) will still get passed to the application exactly as under SGML. It is the application responsibility to handle it correctly.
The parser must inform the application that white-space has occurred in element content, if it can detect it. (Users of SGML will recognize that this information is not in the ESIS, but it is in the Grove.)

The XML specification only stipulates the syntax for XML. Accordingly, the following XML related technologies play an important role in actually using XML:

  • DOM (Document Object Model)
  • SAX (Simple API for XML)

Instead of enabling tracing for individual pages, you can enable it for your entire application. In that case, every page in your application displays trace information. Application tracing is useful when you are developing an application because you can easily enable it and disable it without editing individual pages. When your application is complete, you can turn off tracing for all pages at once.

Displaying 1 of 2Next
1 2
Need Help? Contact Us.

Log in


Forgot password?


New User