Explain XML Namespaces

An XML namespace is a collection of element names or attribute names to be defined within an XML document.
Let’s say you have an invoice XML document and an order XML document and you want to put them together. You usually have certain names that overlap each other – like the date. You might have an invoice date and an order date – both called “date”.

With a namespace, you have an invoice date and an order date, and you can reference them as such – “invoice:date” and then “order:date.” That way you can still use the same two tag names and you won’t get confused about which is which. That’s really what an XML namespace is supposed to do for you.

Advertisements

2 Responses

  1. thnxs i m satisfied with ur anssssss

  2. Why we use “?” (question mark) in xml.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: