XPath
contains a number of functions on node sets, numbers, and strings; here are a
few of them:
count(elem) counts the number of selected
elements
Example: //section[count(student)=1] selects
section with exactly two students children
name() returns the name of the element
Example: //*[name()='student'] is the same as
//student
starts-with(arg1, arg2) tests
if arg1 starts with arg2
Example: //*[starts-with(name(), 'stu']
contains(arg1, arg2) tests
if arg1 contains arg2
Example: //*[contains(name(), 'tud']
Type
|
Output
|
|
Count elements (Students) in XML
|
<?count(STUDENT)?>
|
|
Name of the Element if exists
|
<?//*[name()=’ROLL_NO’]?>
|
|
Starts-with
|
<?//*[starts-with(name(), 'ROLL_NO')]?>
|
OUTPUT IS RETURNED AS BELOW:
Type
|
Output
|
|
Count elements (Students) in XML
|
3
|
|
Name of the Element if exists
|
1201
|
|
Starts-with
|
1201
|
Oracle Apps R12 and Fusion Cloud Self Paced Training Videos Published on Udemy with Live Meeting Support. Please Check https://www.oracleappstechnical.com
ReplyDelete