
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 1.30 KB | hits: 8 | expires: Never
How do XML namespaces work
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.1.xsd">
<context:component-scan
base-package="com.springinaction.chapter01.knight" />
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<html>
<body>
Your text here
</body>
<body>
<height>182 cm</height>
<weight>83 kg</weight>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<html:html xmlns:html="http://www.w3.org/TR/xhtml1/">
<html:body>
Your text here
</html:body>
<human:body xmlns:html="http://www.example.com/human/">
<human:height>182 cm</human:height>
<human:weight>83 kg</human:weight>
</human:body>
</html:html>