SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
XML Namespaces
 Introduction to XML namespaces in Hindi
 Creating XML namespaces in Hindi
 Steps to create XML namespaces in Hindi
 Example
Introduction to XML namespaces
XML एक extensible language क मतलब क क document क क
और programmer extend कर कत और म required changes करत ए
कर कत एक ब त feature और programmers
करत feature क एक म क extend क गए document क
tags क document क tags क conflicts कर कत त क र
documents क extend कर ए
problem क एक solution कत क tags क predefined ब कर
क एक global directory म save कर लए और programmers
tags क करत ए documents create कर ल क कर XML HTML
क तर limited एग और W3C त क XML एक limited
language ब लए problem क solution क ल क XML
namespaces क त
Creating XML namespaces
Namespaces problem क solve करत और XML क limited
ब त Namespaces म ल namespaces create करत Namespace
create करत म म prefix और URI information pass करत
Namespace क root tag म xmlns attribute define क त XMLNS
attribute क ग colon लग कर prefix define क त क ब
assignment operator लग कर namespace क URI pass क त
attribute एक namespaces define कर कत एक
र म क करत
<?xml version="1.0">
<person xmlns:pmale="www.besthinditutorials.com/personmale"
xmlns:pfmale="www.besthinditutorials.com/personfemale>
<pmale:name>Ram</pmale:name>
<pmale:age>24</pmale:age>
<pfmale:name>Sita</pfmale:name>
<pfmale:age>23</pfmale:age>
</person>
ऊ र ए गए र म म male person क और female person क
namespaces क र separate कर क क क क ऊ र
कत example म 2 namespaces create क गए और क structure
same क URI differentiate क त
Steps to create XML namespaces
1. ब ल xmlns attribute define क र
2. क ब xmlns क ग colon लग कर एक prefix define क
prefix त create क गए namespace म elements add
करत
3. क ब assignment operator लग कर एक unique domain URI define
क URI namespace क र namespace differentiate करत
Syntax for creating XML namespaces
<?xml version="1.0">
<root-element xmlns:prefix="URI">
<prefix:sub-element>text</prefix:subelement>
</root-element>
त एक क namespaces define कर कत क तर क
र
<?xml version="1.0">
<root-elment xmlns:prefix1="URI1"
xmlns:prefix2="URI2">
<prefix1:sub-element>Content </prefix1:sub-element>
<prefix2:sub-element>Content</prefix2:sub-element>
</root-element>
Prefix
Prefixes क लग लग namespaces म elements क add कर क लए
क त Prefixes namespaces क uniquely identify कर कत
क developers एक म क prefixes create कर कत Prefixes क
क म त त क namespaces म elements add कर कत
URI
URI's namespaces क uniquely identify कर क लए क त ब
ब तर तर क त क domain name एक URL create कर
ल

Más contenido relacionado

Xml namespaces in Hindi

  • 1. XML Namespaces  Introduction to XML namespaces in Hindi  Creating XML namespaces in Hindi  Steps to create XML namespaces in Hindi  Example Introduction to XML namespaces XML एक extensible language क मतलब क क document क क और programmer extend कर कत और म required changes करत ए कर कत एक ब त feature और programmers करत feature क एक म क extend क गए document क tags क document क tags क conflicts कर कत त क र documents क extend कर ए problem क एक solution कत क tags क predefined ब कर क एक global directory म save कर लए और programmers tags क करत ए documents create कर ल क कर XML HTML क तर limited एग और W3C त क XML एक limited language ब लए problem क solution क ल क XML namespaces क त Creating XML namespaces Namespaces problem क solve करत और XML क limited ब त Namespaces म ल namespaces create करत Namespace create करत म म prefix और URI information pass करत Namespace क root tag म xmlns attribute define क त XMLNS attribute क ग colon लग कर prefix define क त क ब assignment operator लग कर namespace क URI pass क त
  • 2. attribute एक namespaces define कर कत एक र म क करत <?xml version="1.0"> <person xmlns:pmale="www.besthinditutorials.com/personmale" xmlns:pfmale="www.besthinditutorials.com/personfemale> <pmale:name>Ram</pmale:name> <pmale:age>24</pmale:age> <pfmale:name>Sita</pfmale:name> <pfmale:age>23</pfmale:age> </person> ऊ र ए गए र म म male person क और female person क namespaces क र separate कर क क क क ऊ र कत example म 2 namespaces create क गए और क structure same क URI differentiate क त Steps to create XML namespaces 1. ब ल xmlns attribute define क र 2. क ब xmlns क ग colon लग कर एक prefix define क prefix त create क गए namespace म elements add करत 3. क ब assignment operator लग कर एक unique domain URI define क URI namespace क र namespace differentiate करत Syntax for creating XML namespaces
  • 3. <?xml version="1.0"> <root-element xmlns:prefix="URI"> <prefix:sub-element>text</prefix:subelement> </root-element> त एक क namespaces define कर कत क तर क र <?xml version="1.0"> <root-elment xmlns:prefix1="URI1" xmlns:prefix2="URI2"> <prefix1:sub-element>Content </prefix1:sub-element> <prefix2:sub-element>Content</prefix2:sub-element> </root-element> Prefix Prefixes क लग लग namespaces म elements क add कर क लए क त Prefixes namespaces क uniquely identify कर कत क developers एक म क prefixes create कर कत Prefixes क क म त त क namespaces म elements add कर कत URI
  • 4. URI's namespaces क uniquely identify कर क लए क त ब ब तर तर क त क domain name एक URL create कर ल