Four steps of writing XML documents based on Schema

黄舟
Release: 2017-02-16 15:35:30
Original
1892 people have browsed it

The Schema constraint document itself is an XML document with the extension xsd


##Difficulties :XMLHow to write the root element of the document?

Following 4 steps:

a, first look at theSchemadocument and find the root element
 <书架>
Copy after login
b, Thinking: Which namespace does the bookshelf come from? Looking at theSchemadocument,targetNamespaceis the namespace.
Use the xmlns keyword (xmlns namespace declaration) to declare which namespace my elements come from (xmlns: xml namespace)

 
Copy after login

c, thinking: Whichxsdfile does the namespace correspond to? Use theschemaLocationkeyword to associate the corresponding relationship between the namespace andxsd
 
Copy after login


Just leave the remaining tasks to eclipse to automatically generate it.

The case is as follows:

The known Schema constraint document is as follows, write the corresponding xml document


                 
Copy after login

xml document is as follows :


##

   JavaScript网页开发 张孝祥 28  
Copy after login


Final version: Created in a flash sale.

You can create it directly through the Myeclipse tool.


The above is the content of the four steps of writing XML documents based on Schema. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!