Computer Science, asked by aditiverma98, 1 year ago

Can anybody please tell me how to identify the attributes and the child elements in the XML tree and what are attributes please its urgent tomorrow is my exam???????

Answers

Answered by Jainprakhar003
0

Answer:

Explanation:

Root element is the one which contains all other tags. It opens and closes once in the document

Child element is which contains no tags in it and contains only the information about itself

Attributes are the information used to describe the element in which it is written

Answered by Anonymous
2

Answer

For better understanding take an example,

<?xml version="1.0"?>

   <employee id="901">

       <name>

           <first>John</first>

           <last>Doe</last>

       </name>

       <office>344</office>

       <salary currency="USD">55000</salary>

   </employee>

Attributes

Here attribute of <employee> is id=901 so while making the tree structure you need to write the attribute value under the box of employee (eg. id=901).

Similarly, currency=USD is the attribute of <salary>.

Child elements

Every subsequent tag after the root element is called child element.

Eg. <name> is the child of <employee>

Similarly, <first> and <last> are childs of <name>


aditiverma98: Thank you so much
aditiverma98: Really helpful for me
Anonymous: pls mark as brainliest
Anonymous: oh u did
Anonymous: thanks a lot
aditiverma98: Already marked for this Briallient answer
Anonymous: thnx a lot
aditiverma98: Welcome
Similar questions