Check XML Without any DTD or schema.

  • Thread starter gajewski.konrad
  • Start date
G

gajewski.konrad

Hi All.

I'm newbee. I try to check syntax any XML file. I don't have any dtd or
shema file to this xml.
Is this possible that I check syntax in any xml file in python.

Regards,
Dreamen
 
D

Diez B. Roggisch

I'm newbee. I try to check syntax any XML file. I don't have any dtd or
shema file to this xml.
Is this possible that I check syntax in any xml file in python.

There are two forms of checking xml-documents:

- well-formedness, which means that the document adheres to the xml syntax,
that open tags are properly closed and tags in general form a tree
structure. Maybe some other things too, but that is the gist of it.

- validity according to a schema/dtd, which is only possible to check for
well-formed documents

The first you check by simply opening a file using a xml parser. The second
is only possible in presence of a schema-document and a validating parser -
which not all are.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top