News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

Default Namespaces

Started by ben2ong2, October 06, 2006, 02:42:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ben2ong2

Defining a default namespace for an element saves us from using prefixes in all the child elements. It has the following syntax:
xmlns="namespaceURI"
This XML document carries information in a table:
<table xmlns="You are not allowed to view links. Register or Login">   <tr>   <td>Apples</td>   <td>Bananas</td>   </tr></table>
This XML document carries information about a piece of furniture:
<table xmlns="You are not allowed to view links. Register or Login">   <name>African Coffee Table</name>   <width>80</width>   <length>120</length></table>


You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login