Search code examples
xmlschemaxsddtdstandards-compliance

Is this a valid XML?


I have a feeling this XML is not valid, can someone please explain why?

I think it has something todo this the dot i the element name?

estate_price.price_suggestion

Any thing else not valid about this XML?

XML

 \\ <?xml version="1.0" encoding="UTF-8"?>

<iad>
  <DataTag>
    <element id="0">
      <changed_string>content</changed_string>
      <no_of_bedrooms>content</no_of_bedrooms>
      <published_string>content</published_string>
      <mmo>content</mmo>
      <postcode>content</postcode>
      <utmx>content</utmx>
      <utmy>content</utmy>
      <disposed>content</disposed>
      <property_type>content</property_type>
      <isprivate>content</isprivate>
      <heading>content</heading>
      <published>content</published>
      <estate_price.price_suggestion>content</estate_price.price_suggestion>
      <ownership_type>content</ownership_type>
      <estate_size.useable_area>content</estate_size.useable_area>
      <adid>content</adid>
      <address>content</address>
      <sqmtrprice>content</sqmtrprice>
      <estate_size.primary_room_area>content</estate_size.primary_room_area>
      <location>content</location>
      <changed>content</changed>
      <orgname>content</orgname>
    </element>
    <element id="1">
      <changed_string>content</changed_string>
      <no_of_bedrooms>content</no_of_bedrooms>
      <published_string>content</published_string>
      <mmo>content</mmo>
      <postcode>content</postcode>
      <utmx>content</utmx>
      <utmy>content</utmy>
      <disposed>content</disposed>
      <property_type>content</property_type>
      <isprivate>content</isprivate>
      <heading>content</heading>
      <published>content</published>
      <estate_price.price_suggestion>content</estate_price.price_suggestion>
      <ownership_type>content</ownership_type>
      <estate_size.useable_area>content</estate_size.useable_area>
      <adid>content</adid>
      <address>content</address>
      <sqmtrprice>content</sqmtrprice>
      <estate_size.primary_room_area>content</estate_size.primary_room_area>
      <location>content</location>
      <changed>content</changed>
      <orgname>content</orgname>
    </element>
  </DataTag>
</iad>

Solution

  • We would need to have the schema you are validating against to tell you whether your document is valid or not.

    There is nothing about estate_price.price_suggestion as an element name that is forbidden by the XML specification, however your schema may well place a constraint over your document content and structure that does not permit that element (or any other element) to be placed where it is.