Examples of XML
Examples of XML
Examples of XML
Example of XML
<?xml version = "1.0"?>
<bname>
<name>CBT</name>
<no>100</no>
<price>400</price>
</bname>
XFORMS
<?xml version="1.0"?>
<bookstore xmlns:xlink="http://www.w3.org/1999/xlink">
<book>
<title xlink:type="simple" xlink:href="http://example.com/book/1">Introduction to XML</title>
<author>John Doe</author>
</book>
<book>
<title xlink:type="simple" xlink:href="http://example.com/book/2">XML for Beginners</title>
<author>Jane Smith</author>
</book>
</bookstore>
OUTPUT:
XQUERY
<?xml version="1.0"?>
<bookstore>
<book>
<title>Introduction to XML</title>
<author>John Doe</author>
<price>29.99</price>
</book>
<book>
<title>XML for Beginners</title>
<author>Jane Smith</author>
<price>19.95</price>
</book>
</bookstore>
This XQuery example retrieves the titles of books with a price greater than 35 from an XML document
named "books.xml."
OUTPUT:
Introduction to XML
CSS (CASCADING STYLE SHEETS)
is a style sheet language used for describing the presentation of a document written in HTML or XML. It
defines how elements are to be displayed on the screen, in print, or spoken.
CSS Syntax:
selector {
property: value;
}
/* Styling paragraphs */
p{
color: blue;
font-size: 16px;
}
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Example</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Welcome to CSS Example</h1>
</header>
<section>
<p>This is a simple paragraph on the webpage.</p>
</section>
<button>Click me</button>
</body>
</html>
styles.css
/* Body styles */
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
}
/* Paragraph styles */
p{
color: #333;
font-size: 1.2em;}