Xquery Quiz

  Xquery Quiz


Q1. What will be the output for the below query? Please do not execute this query on ML Qconsole for the answer, just think yourself the answer. 

xquery version "1.0-ml";

let $a  := 'abc'
let $b  := concat($a, if(fn:true()) then 'd' else 'e')
return $b
 

Q2.  Please download attached XML (sample_rentable_feed.xml) and find the last 20 'Address' element where attribute value is 'AddressType="property" from the XML and create a table with below elements.
<City>
 <State>
 <PostalCode>
<Country>
<CountyName>
                  
Q3. Use the above-shared XML and create a new XML for element 'Property' and save it with attribute IDValue if the last digit of element 'APN' should not be greater than '0061'. 

I'm talking about highlighted value <APN>08.032.21.32.0061</APN>

i.e.  output name '2181740.xml'
and file content should be:

  <Property IDValue="2181740"...>
......
</Property>

Q.4 Use the above-shared XML and create a map for the 'Amenity' element to check how many types of attribute value 'AmenityType' is coming in the XML.


Q.5 Use the above-shared XML and create a map for the 'Amenity' element to check how many same types of attribute value 'AmenityType' are coming in the XML.
 


Comments

Popular posts from this blog

HTTP Servers, Database, Forest

Xquery

Marklogic Fundamentals