book.xml
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book>
<title lang="eng">XML block book</title>
<price>29.99</price>
</book>
<book>
<title>Xml 1.1 Bible</title>
<price>39.95</price>
</book>
<book>
<title lang="spanish">principles of comiler</title>
<price>45.20</price>
</book>
</bookstore>
Using the book.xml file find the answer to the following queries
what the syntax XPath :
a) find an expression to find all English books.
a) Find books having lang attribute and also their price is below 30.
b) Display title of last book.
c) Showing only title of books having price below 30
d) Find book not written in German language.
e) Find books having price between 30 to 50
s)Find titles book having title more than 20 characters long.book.xml
- h) Evaluate the following XPATH expressions
//book/title/@lang
2. //book/title[(@lang)]
3. //book/title[(@lang)]/@lang
4. //book[(title)]
5. //book[not (title)]/price
6. //book[(title|price)]
7. //book[round(price) = 30]/title
8. //book[round(price) > 30]/title
9. bookstore[count(book)<5]/book[2]/title - h) Evaluate the following XPATH expressions
//book/title/@lang
2. //book/title[(@lang)]
3. //book/title[(@lang)]/@lang
4. //book[(title)]
5. //book[not (title)]/price
6. //book[(title|price)]
7. //book[round(price) = 30]/title
8. //book[round(price) > 30]/title
9. bookstore[count(book)<5]/book[2]/title
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- Generate an XSD for the following XML document <?xml version="1.0" encoding="UTF-8"?> <company> <employee> <id>101</id> <name>Ram</name> <salary>10000</salary> <email>ram@gmail.com</email> </employee> <employee> <id>102</id> <name>Dinesh</name> <salary>20000</salary> <email>dinesh@gmail.com</email> </employee> <employee> <id>103</id> <name>sathish</name> <salary>20000</salary> <email>sathish@gmail.com</email> </employee> <employee> <id>104</id> <name>Praveen</name> <salary>20000</salary> <email>praveen@gmail.com</email> </employee> </company>arrow_forward<DOCTYPE><html><heal><tite><meta>head><body> <p>Chapter 1, Analyze, Correct, Improve<dr> <P>HTML stands for Hyperlink Makes Learning fun.<p><p>You use presentation software to create HTML pages.</p<PHTML9 is the latest version of HTML.</p>HTML is rendered within the desktop of an operating system.</BODY>arrow_forwardDescribe the XML schema.arrow_forward
- Which are the XML code segments?arrow_forwardIf you are sending XML data that you do not want parsed, you would put this data within which type of tag?arrow_forwardWe need to store the following product inventory list in a well-formed XML document which adheres to a DTD file. First, convert the table data given below into a well-formed XML document. Then, create the corresponding DTD document to which your created XML document adheres. Use Notepad and save your documents as wk8hwpt3.xml and wk8hwpt3.dtd on your Desktop, respectively. Refer to figure 15.17 in the textbook for an example.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education