fscked schrieb:
> # Create the base element
> boxes = doc.createElement("boxes")
> myfile = open('ClientsXMLUpdate.txt')
> csvreader = csv.reader(myfile)
> for row in csvreader:
> mainbox = doc.createElement("box")
> doc.appendChild(boxes)
> r2 = csv.reader(myfile)
> b = r2.next()
Martin v. Löwis wrote:
<...snip...>
> I find that hard to believe. There is no code in Python that does
> removal of characters, and I can't see any other reason why it gets
> removed.
>
> OTOH, what I do get when writing to a file is a UnicodeError, when
> it tries to convert the Unicode string
fscked schrieb:
> Well, let me clarify. If I just print it to the screen/console it works
> fine, but when I do:
>
> out.write( doc.toprettyxml())
>
> it just removes the character that would be the "ö".
>
> I can post the code if anyone wants to see it, but it is fairly
> straightforward.
I fi
Martin v. Löwis wrote:
> fscked schrieb:
> > Hi guys/gals.
> >
> > I am trying to write and xml file from data parsed from a csv.
> >
> > I can get everything to work except that I cannot get minidom to do -->
> > ö which needless to say is driving me nuts.
> >
> > Any suggestions?
>
> Works fine
fscked schrieb:
> Hi guys/gals.
>
> I am trying to write and xml file from data parsed from a csv.
>
> I can get everything to work except that I cannot get minidom to do -->
> ö which needless to say is driving me nuts.
>
> Any suggestions?
Works fine for me:
py> d = minidom.Document()
py> r
Hi guys/gals.
I am trying to write and xml file from data parsed from a csv.
I can get everything to work except that I cannot get minidom to do -->
ö which needless to say is driving me nuts.
Any suggestions?
What it ends up doing is just removing the character from the
datastream.
--
http:/