Following are the available properties for accessing element and attribute values:
??‘ Descendant axis??”Returns all the child elements of the specified element regardless
how deep in the hierarchy the child elements are found. The preceding example illustrates
this point. The
element is several nodes deep in the XML fragment but through the
use of the descendant axis property you can easily access the value of that node, as
shown above.
Because it doesn??™t matter how deep in the hierarchy the element is found, you can use the same
syntax to return the value of the as well as any other element.
??‘ Child axis??”Returns all the elements that are child elements of the specified element. This property
is used to return all the child elements of a specified element. For example:
employee.
??‘ Attribute axis??”Returns all the attributes of the specified element. From the preceding XML
fragment, this property can be used to return the EmpID attribute of node:
Employee..@EmpID
??‘ Value??”Returns a string containing the object (value) for the first object found in the sequence.
Pages:
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316