XML preference series (2)

Source: Internet
Author: User
Series 4: Document Type Definition DTD (DocumentTypeDefinition) "WellFormed" XML document a "WellFormed" XML document is a document that satisfies the XML syntax rules I have previously mentioned. for example, the following is an XML document of "WellFormed :? Xmlve Series 4: Document Type Definition DTD (Document Type Definition)

'Well Formed 'XML document
A 'well Formed 'XML document is
Documents that meet the XML syntax rules I have previously mentioned.

For example, the following is an XML document of 'Well Formed:


Tove
Jani
Reminder
Don't forget me this weekend!


'Valid' (I translated it into 'payby') XML document
A 'valid' XML document is a 'well formed' XML document that meets the DTD rules.
For example, the following document is the same as the above document, but adds reference to the DTD



Tove
Jani
Reminder
Don't forget me this weekend!


Document Type Definition
The following is the DTD file (InternalNote. dtd ):






]>


! The node in the second line of DOCTYPE note is the 'note' type in the XML document.
! The 'note' ELEMENT defined in the third line of ELEMENT note has four elements: 'to, from, heading, body '.
! The fourth line of ELEMENT to defines the 'to' ELEMENT type as '# pcdata '.
! ELEMENT from defines the 'from' ELEMENT type as '# pcdata '.
And so on.

Why apply DTD?
XML provides an independent application method to share data.
With DTD, people in different groups can use the common DTD to exchange data.
Your application can apply the DTD of this scale to verify that the data you receive is valid.
You can also apply a DTD to verify your data.

Some well-known defined standards (data exchange standards between different industries) DTDs
For more information, see http://www.xmlx.com/and http://www.schema.net.

Translation: Batman
Series 5: XML in NetScape and IE

XML in the website
A large number of applications support XML.
Here we will discuss the XML supported by IE5.0.
Some people may complain, but there is no way, because IE5 is
The only browser that can directly describe the XML file. it is also the only browser that can be used directly on the website.
View the contents of the XML file.
Unfortunately:
Although you will wait for NetScape to support XML, if you want to continuously apply
For the specific XML example, you can use IE5.0 as a reality (if you want to learn XML easily)

XML in Netscape Navigator 5
Netscape promises to fully support XML in the new Navigator 5.
We look forward to seeing that it can include support for W3C XML at the supporting scale,
Just like what is implemented in IE.
For how to implement XML, please refer to my article id = 81445

XML in IE5
Internet Explorer 5 fully supports the XML 1.0 scale and XML Document Model DOM.
These scales are defined by World Wide Web Consortium (W3C.

Internet Explorer 5.0 supports the following XML features:
You can browse XML documents
Fully supports W3C DTD scale
XML is embedded into the HTML page as a data Island
You can bind XML data to HTML elements.
Supporting the application of XSL structured XML
Supporting CSS-based XML
Support CSS
You can visit XML through XML DOM
Specific examples will be introduced in the next series

Translation: Batman
Series 6: Microsoft's XML interpreter
Application Microsoft XML interpreter
If you want to browse, update, create and hold an XML document
You need an XML interpreter. Microsoft's XML interpreter is a COM component announced along with IE5.
If you have installed IE 5.0, you can apply this interpreter to your HTML script or the ASP file.
The following table describes the features of the tool:
Support JavaScript, VBScript, Perl, VB, Java, C, etc.
Supports W3C XML 1.0 and XML DOM
Support and validation DTD
If you are applying JavaScript in Ie5.0

You can use the following code to create an XML document object:
Var xmlDoc = new ActiveXObject ('Microsoft. XMLDOM ')

If you are used to using VBScript, use the following code to create the XML document object:
Set xmlDoc = CreateObject ('Microsoft. XMLDOM ')

If you use VBScript in ASP, the code is as follows:
Set xmlDoc = Server. CreateObject ('Microsoft. XMLDOM ')

Load the XML file into the interpreter
The following code loads an existing XML document (note. xml) into the XML interpreter:

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.