xmlns="http://schemas.microsoft.com/client/2007"

  • Thread starter Thread starter somequestion
  • Start date Start date
somequestion said:
in xml document , there is code like [
xmlns=http://schemas.microsoft.com/client/2007 ]

is this necessary? what is this?

That is a namespace declaration, in this case a default namespace
declaration. If you have e.g.
<foo xmlns="http://schemas.microsoft.com/client/2007">
<bar>
<foobar/>
</bar>
</foo>
then the foo element and its descendants bar and foobar are in this
namespace http://schemas.microsoft.com/client/2007.

can i use xml code without xmlns attribute?

You can but you might lose the semantics. With
<html xmlns="http://www.w3.org/1999/xhtml"></html>
the html element is recognized as an XHTML element while
<html></html>
is just an arbitrary element with name html in no namespace.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top