I'm having trouble understanding the difference between
node(). From what I understand,
text() would be whatever is in between the tags
<item>apple</item> which is apple in this case. Node would be whatever that node actually is, which would be item
But then I've been assigned some work where it asks me to "Select the text of all items under produce" and a separate question asks "Select all the manager nodes in all departments"
How is the output suppose to look
text() as opposed to
Snippet of XML:
<produce> <item>apple</item> <item>banana</item> <item>pepper</item> </produce> <department> <phone>123-456-7891</phone> <manager>John</manager> </department>
Of course, there are more departments and more managers, but this was just a snippet of code.
Any help would be much appreciated!