[xml] Reading an XML File using xmlTextReader (in python)



Hello,

I am trying to figure out something. Why does the TextReader.Value() method
cutoff the string after around 500 chars, is there any way to get the rest
of the string. For example assume we have the following xml file:

<start>
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
...keep repeating many, many times
</start>

And the python script:

r = newTextReaderFilename("foo.xml")

while(r.Read()):
  str = r.Value()
  if(str):
    print str

The output will only contain around 500 chars even though the value of the
<start> element contains far more characters than that.

Nathan Bullock



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]