bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/0.1
1
by Henrik G.
First seed of Lenasys ... Needs to be Organized Further |
1 |
<span class="description"> |
2 |
<br> |
|
3 |
<div class="descriptionheading">Overview</div> |
|
4 |
This example shows how to do very basic validation of an XML document. |
|
5 |
<br><br> |
|
6 |
<div class="descriptionheading">Well formedness</div> |
|
7 |
The DOM parser automatically tests for well-formedness when loading the file (row 10). |
|
8 |
The value that is returned from the <span class="interestingdescription">load</span> method is true if the file was well-formed and false if not. |
|
9 |
<br><br> |
|
10 |
<div class="descriptionheading">Validation</div> |
|
11 |
Validation of the file using the DTD linked by the XML file (if such a link exists) is performed with the <span class="interestingdescription">validate</span> method. |
|
12 |
The value returned is true if the file is valid and false if not. |
|
13 |
<br><br> |
|
14 |
Validation is as simple as this in the simplest case. However we do not get very detailed information abou why validation or well-formedness has failed. |
|
15 |
<br><br> |
|
16 |
<div class='exampleheading'>Web Page Output:<br><br> |
|
17 |
<img src='DomExample2.png'> |
|
18 |
</div> |
|
19 |
||
20 |
</span> |