database xml sql 1

database xml sql









Here is what the above code is Doing:
1. We create a new XML document called “root”
2. We create a new XML element called “sura” and add it to the root document
3. We create a new XML element called “aya” and add it to the “sura” element
4. We add a new attribute to the “aya” element called “id” and give it the value “1”
5. We add a new attribute to the “aya” element called “text” and give it the value “In the name of Allah, the Beneficent, the Merciful.”
6. We add the “aya” element to the “sura” element
7. We repeat steps 3-6 for the rest of the ayas
8. We print the XML document to the screen

The output of the above code is:











Similar Posts