displaying XML in JavaScript

Source: Internet
Author: User
Tags date html page
javascript|xml| Display

You can display XML in JavaScript. You can use JavaScript (or VBScript) to enter data from an XML file and display the XML data in an HTML page. To see how XML and HTML complement each other, you can do this by first finding the XML document (Note.xml), and then opening the HTML document
(note.htm), which contains JavaScript for reading XML files, and displays information in a predefined range of HTML pages.


You can try it on your own. In Dom school, you can see a lot of this kind of JavaScript.

XML in the real world

Some real examples illustrate how to carry information in XML.



Example: Xmlnews



Xmlnews is a specification for exchanging news and other information. Using such a standard makes it easier for news producers and news consumers to use different hardware, software, and programming languages to produce, receive, and archive all kinds of news information. An example of an XML News document:



< XML version= "1.0"?>


< nitf>


< head>
< Title>colombia earthquake</title>


< body>


< body.head>
< headline>
< hl1>143 Dead in Colombia earthquake< byline>
< Bytag>by Jared Kotler, Associated Press writer</bytag>
</byline>
< dateline>
< Location>bogota, colombia</location>
< story.date>monday January 1999 7:28 et</story.date>
</dateline>
</body.head>


</body>


</nitf>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.