ఎక్స్ఎమ్ఎల్ వినియోగం
XML వెబ్ డెవలప్మెంట్ యొక్క ప్రతి భాగంలో వినియోగించబడుతుంది.
XML సాధారణంగా డేటా మరియు ప్రదర్శనను వేరు పడుస్తుంది.
XML డేటా మరియు ప్రదర్శనను వేరు పడుస్తుంది.
XML డేటా ప్రదర్శన గురించి ఏ సమాచారం లేదు.
అదే XML డేటా అనేక వివిధ ప్రదర్శన సందర్భాలకు వినియోగించబడవచ్చు.
దీనికి కారణంగా, XML ద్వారా డేటా మరియు ప్రదర్శన మధ్య పూర్తిగా వేరు పడతాయి.
XML సాధారణంగా HTML యొక్క అనుబంధం
అనేక హైట్మ్ల్ అప్లికేషన్స్లో, XML డాటాను నిల్వ చేయడానికి లేదా బదిలీ చేయడానికి ఉపయోగించబడుతుంది మరియు HTML డాటాను ఫార్మాట్ చేయడానికి మరియు ప్రదర్శించడానికి ఉపయోగించబడుతుంది.
XML HTML నుండి డాటాను వేరు చేస్తుంది
HTML లో డాటా ప్రదర్శించడానికి ఉపయోగించినప్పుడు, డాటా మార్చబడినప్పుడు మీరు HTML ఫైల్ను సవరించవలసిన అవసరం లేదు.
XML ద్వారా డాటా ప్రత్యేక XML ఫైల్లో నిల్వ చేయబడుతుంది.
కొన్ని జావాస్క్రిప్ట్ కోడ్లు మాత్రమే ఉపయోగించి మీరు XML ఫైల్ని చదివి ఆప్టింగ్లో డాటా సమాచారాన్ని నవీకరించవచ్చు.
Books.xml
<?xml version="1.0" encoding="UTF-8"?> <bookstore> <book category="美食"> <title lang="zh">雅舍谈吃</title> <author>梁实秋</author> <press>江苏文艺出版社</press> <year>2013</year> <price>35</price> <ISBN>9787539962771</ISBN> </book> <book category="儿童"> <title lang="zh">了不起的狐狸爸爸</title> <author>罗尔德·达尔</author> <translator>代维</translator> <press>明天出版社</press> <year>2009</year> <price>10</price> <ISBN>9787533259563</ISBN> </book> <book category="文学"> <title lang="zh">将熟悉变为陌生</title> <author>齐格蒙·鲍曼</author> <author>彼得·哈夫纳</author> <translator>王立秋</translator> <press>南京大学出版社</press> <year>2023</year> <price>68</price> <ISBN>9787305269387</ISBN> </book> <book category="科学"> <title lang="zh">你想飞吗,像鸟一样?</title> <author>理查德·道金斯</author> <author>亚娜·伦佐娃</author> <translator>高天羽</translator> <press>湖南科学技术出版社</press> <year>2023</year> <price>88</price> <ISBN>9787571019075</ISBN> </book> <book category="政治" cover="平装"> <title lang="zh">论美国的民主</title> <author>托克维尔</author> <translator>董果良</translator> <press>商务印书馆</press> <year>1989</year> <price>60</price> <ISBN>9787100124553</ISBN> </book> </bookstore>
ఈ శిక్షణలో DOM భాగంలో మీరు XML మరియు JavaScript ఉపయోగం గురించి మరింత తెలుసుకోండి.
ట్రేడింగ్ డేటా
అనేక పరిశ్రమలలో విలువైన XML ఫార్మాట్లు ఉన్నాయి మరియు రోజుకొక రోజు డేటా ఎక్స్చేంజ్లను వివరిస్తాయి:
- షెయర్లు మరియు షెయర్లు
- ఫైనాన్షియల్ ట్రేడింగ్
- వైద్య డేటా
- గణిత డేటా
- శాస్త్రీయ మాపన
- వార్తా సమాచారం
- వాతావరణ సేవలు
ఉదాహరణ: XML వార్తలు
XMLNews వార్తలు మరియు ఇతర సమాచారానికి మార్గదర్శకం.
ప్రామాణికం ఉపయోగం ప్రయోజనాలు: వార్తా కర్తలకు మరియు వార్తా గ్రహణకర్తలకు వివిధ హార్డ్వేర్, సాఫ్ట్వేర్ మరియు ప్రోగ్రామింగ్ భాషలలో వార్తల రచన, గ్రహణ మరియు నిల్వ చేయడానికి సులభతరం చేస్తుంది.
XMLNews డాక్యుమెంట్ ఉదాహరణ:
<?xml version="1.0" encoding="UTF-8"?> <nitf> <head> <title>东航C919首次执飞京沪航线</title> </head> <body> <headline> <hl1>东航C919首次执飞上海虹桥往返北京大兴航线</hl1> </headline> <byline> <bytag>中央广播电视总台</bytag> </byline> <dateline> <location>上海虹桥国际机场</location> <date>2024年01月09日</date> </dateline> </body> </nitf>
ఉదాహరణ: XML వాతావరణ సేవలు
NOAA(దేశ సముద్ర మరియు గగన విభాగం)అందించిన XML దేశ వాతావరణ సేవలు:
<?xml version="1.0" encoding="UTF-8"?> <current_observation> <credit>NOAA's National Weather Service</credit> <credit_URL>http://weather.gov/</credit_URL> <image> <url>http://weather.gov/images/xml_logo.gif</url> <title>NOAA's National Weather Service</title> <link>http://weather.gov</link> </image> <location>New York/John F. Kennedy Intl Airport, NY</location> <station_id>KJFK</station_id> <latitude>40.66</latitude> <longitude>-73.78</longitude> <observation_time_rfc822>Mon, 11 Feb 2008 06:51:00 -0500 EST</observation_time_rfc822> </observation_time_rfc822> <weather>A Few Clouds</weather> <temp_f>11</temp_f> <temp_c>-12</temp_c> <relative_humidity>36</relative_humidity> <wind_dir>West</wind_dir> <wind_degrees>280</wind_degrees> <wind_mph>18.4</wind_mph> <wind_gust_mph>29</wind_gust_mph> <pressure_mb>1023.6</pressure_mb> <pressure_in>30.23</pressure_in> <dewpoint_f>-11</dewpoint_f> <dewpoint_c>-24</dewpoint_c> <windchill_f>-7</windchill_f> <windchill_c>-22</windchill_c> <visibility_mi>10.00</visibility_mi> <icon_url_base>http://weather.gov/weather/images/fcicons/</icon_url_base> <icon_url_name>nfew.jpg</icon_url_name> <disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url> <copyright_url>http://weather.gov/disclaimer.html</copyright_url> </current_observation>