in Technology by

You are working with this XML code snippet from the XML document cars.xml. You need to return the information about the cars built after the year 2000. What does your XQuery look like?

<cars>
    <car><make>Cadillac</make><model>Escalade</model><year>2007</year></car>
    <car><make>Cadillac</make><model>Escalade</model><year>2011</year></car>
    <car><make>Ford</make><model>Mustang</model><year>1968</year></car>
    <car><make>Ford</make><model>Mustang</model><year>1998</year></car>
    <car><make>Mercedes</make><model>C-Class</model><year>1999</year></car>
    <car><make>Mercedes</make><model>C-Class</model><year>2009</year></car>
</cars>

A.doc("cars.xml")/cars/car[year>2000].data

B.doc("cars.xml")/cars/car[xs:integer(year) gt 2000]

C.doc("cars.xml")/cars/car[year gt 2000]

D.doc("cars.xml")/cars/car[integer(year) > 2000]

1 Answer

0 votes
by

Correct answer is :- A.doc("cars.xml")/cars/car[year>2000].data

Related questions

0 votes
    Suppose you have some subset of codes with you while working with the SVN and you need to move them from one SVN repo ... to another along with their history, how this can be done?...
asked Feb 18, 2021 in Technology by JackTerrance
0 votes
0 votes
    You are converting your HTML file into XHTML Strict. Which code snippet will validate without errors? asked Mar 10, 2023 in Technology by JackTerrance
0 votes
    You are given a dataset on cancer detection. You have built a classification model and achieved an accuracy of 96 percent ... with your model performance? What can you do about it?...
asked Apr 27, 2021 in Technology by JackTerrance
0 votes
    Predict the output of the following code snippet function foo(input: boolean) { let one = 1200; if (input) { let ans ... 1. 1201 2. Undefined 3. Compilation error 4. Runtime error...
asked Jun 29, 2021 in Technology by JackTerrance
0 votes
    program code for this question: Raju has a lot of strings but he does not like all of them.He likes only Swaggy ... at least K times. Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    A built un function is a function which: A)comes with python and is an integral part of python B)has been ... D)has be imported Select the correct answer from above options...
asked Dec 16, 2021 in Education by JackTerrance
0 votes
    I have an XML file which is structured as follows: place1 location1 place2 location2 place3 location3 These ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    You are working with the following XSD fragment. What does it say about the element? element has child elements which can appear in any order...
asked Mar 10, 2023 in Technology by JackTerrance
0 votes
    If you want to make some information prominent in your document what a type of change will you perform? Select the correct answer from above options...
asked Dec 6, 2021 in Education by JackTerrance
0 votes
    If you want to make some information prominent in your document what a type of change will you perform? Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    If you want to make some information prominent in your document what a type of change will you perform? Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    Is it possible to model transitioning data like time-zone or a working directory? State reason behind your answer....
asked Oct 16, 2020 in Technology by JackTerrance
0 votes
    class year { public static void main() { int a=2000; if( a%4 == 0 && a%100 != 0); { System.out.println ... this it is showing 2 errors Select the correct answer from above options...
asked Dec 9, 2021 in Education by JackTerrance
...