Interview Questions

What happens if no XML namespace declaration is in scope?

XML Interview Questions and Answers


(Continued from previous question...)

82. What happens if no XML namespace declaration is in scope?

If no XML namespace declaration is in scope, then any prefixed element type or attribute names result in namespace errors. For example, in the following, the names google:A and google:B result in namespace errors.
<?xml version="1.0" ?>
<google:A google:B="error" />

In the absence of an XML namespace declaration, unprefixed element type and attribute names do not belong to any XML namespace. For example, in the following, the names A and B are not in any XML namespace.

(Continued on next question...)

Other Interview Questions