On 4/14/2010 4:16 PM, Karjer Jdfjdf wrote:
I'm having problems with creating XML-documents, because I don't seem to write it to a document correctly. I have to write the document from a loop:

    doc.write('<?xml version="1.0" encoding="iso-8859-1"?>\n')
    ....
    for instance in query:
        if doc != None:
            text = str('<record id="' + str(instance.id)+ '">\n' + \
' <date>' + str(instance.datetime) + ' </date>\n' + \
                       ' <order>'  + instance.order +  ' </order>\n' + \
                       '</record>\n')
            doc.write(text)

When I try to parse it, it keeps giving errors.


I am frustrated with the lack of clarity and completeness. Please respect our time as volunteers by giving complete explicit informaion.

Show us the resultant file.

Tell us what parsing tool you are using.

Show us the exact errors.

[snip]

--
Bob Gailer
919-636-4239
Chapel Hill NC

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to