C. thinking: which xsd file does the namespace correspond? Use the schemaLocation keyword to associate the ing between the namespace and xsd. the Schema constraint document itself is an XML document with the extension xsd
Difficulty: how to write the root element of the XML document? Step 4: a. First, read the Schema document and find the root element.
<书架>
B. thinking: which namespace does the bookshelf come from? Read the Schema document. targetNamespace is the namespace.
Use the xmlns keyword (xmlns namespace declaration) to declare the namespace from which my element comes from (xmlns: xml namespace)
C. thinking: which xsd file does the namespace correspond? Use the schemaLocation keyword to associate the correspondence between the namespace and xsd
The remaining tasks are automatically generated by eclipse.
The example is as follows:
The Schema constraints are known as follows and the corresponding xml document is written.
The xml document is as follows:
JavaScript Web development
Zhang Xiaoxiang
28
Final version: created in seconds.
You can directly create it using the Myeclipse tool.
The above section describes how to write XML documents based on the Schema. For more information, see The PHP Chinese website (www.php1.cn )!