Bu xml dosyası için dtd doğru?

0 Cevap php

Ben bu xml dosyası vardır:

data_out.xml

<?xml version="1.0" ?> 
<!DOCTYPE allproperty SYSTEM "data_out.dtd">
<allproperty>
    <aproperty>
      <postcode>ha15rs</postcode> 
      <price>250</price> 
      <imagefilename>home2.gif</imagefilename> 
      <visits>2</visits> 
    </aproperty>
    <aproperty>
      <postcode>ha36gs</postcode> 
      <price>150</price> 
      <imagefilename>home3.gif</imagefilename> 
      <visits>1</visits> 
    </aproperty>
    <aproperty>
      <postcode>ha27se</postcode> 
      <price>300</price> 
      <imagefilename>home4.gif</imagefilename> 
      <visits>4</visits> 
    </aproperty>
    <aproperty>
      <postcode>ha4678</postcode> 
      <price>200</price> 
      <imagefilename>home5.gif</imagefilename> 
      <visits>5</visits> 
    </aproperty>
</allproperty>

DTD dosyası

data_out.dtd

<!ELEMENT aproperty (postcode,price,imagefilename,visits)>
<!ELEMENT postcode (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT imagefilename (#PCDATA)>
<!ELEMENT visits (#PCDATA)>

Ben kontrol edebilirim zaman "allproperty beyan edilmez" diyerek bir hata almaya devam

0 Cevap