Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 1.30 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How do XML namespaces work
  2. <?xml version="1.0" encoding="UTF-8"?>
  3.  
  4. <beans xmlns="http://www.springframework.org/schema/beans"
  5.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6.        xmlns:aop="http://www.springframework.org/schema/aop"
  7.        xmlns:context="http://www.springframework.org/schema/context"
  8.  
  9.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  10.            http://www.springframework.org/schema/beans/spring-beans.xsd
  11.            http://www.springframework.org/schema/aop
  12.            http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
  13.            http://www.springframework.org/schema/context
  14.            http://www.springframework.org/schema/context/spring-context-2.1.xsd">
  15.  
  16.   <context:component-scan
  17.       base-package="com.springinaction.chapter01.knight" />
  18.  
  19. </beans>
  20.        
  21. <?xml version="1.0" encoding="UTF-8"?>
  22. <html>
  23.       <body>
  24.         Your text here
  25.       </body>
  26.       <body>
  27.         <height>182 cm</height>
  28.         <weight>83 kg</weight>
  29.       </body>
  30. </html>
  31.        
  32. <?xml version="1.0" encoding="UTF-8"?>
  33. <html:html xmlns:html="http://www.w3.org/TR/xhtml1/">
  34.   <html:body>
  35.     Your text here
  36.   </html:body>
  37.   <human:body xmlns:html="http://www.example.com/human/">
  38.     <human:height>182 cm</human:height>
  39.     <human:weight>83 kg</human:weight>
  40.   </human:body>
  41. </html:html>