|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vaidating XML against DTD problem!
Please look at the following xml and the corrosponding DTD
Using XML Spy: My XML file is well formed but when I validate it against it's corrosponding DTD it gives an error saying: file is not valid Unexpected child element '2'. I don't know what's wrong, is there a problem in the DTD. <0> contains zero or more <1> and <1> contains zero or more <2> and <3>. Any help is appreciated. Thanks *************** XML file ************ <A> <0> <1>1</1> <1>1</1> <2>2</2> <1>1</1> <1>1</1> <1>1</1> <2>2</2> <1>1</1> <2>2</2> <1>1</1> <1>1</1> <1>1</1> <2>2</2> <3>3</3> <1>1</1> <1>1</1> <2>2</2> <3>3</3> </0> <4>4</4> <9>9</9> </A> ************** Corrosponding DTD **************** <!ELEMENT A (0?,4?,9?)> <!ELEMENT 0 (1*)> <!ELEMENT 1 (TEXT?,2*,3*)> <!ELEMENT 2 (TEXT?)> <!ELEMENT 3 (TEXT?)> <!ELEMENT 4 (TEXT?)> <!ELEMENT 9 (TEXT?)> <!ELEMENT TEXT (#PCDATA)> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Vaidating XML against DTD problem! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|