xml parsing takes extra spaces.
- by SDK
I have been trying to write/parse xml file in python. The tags are very simple
<main>
<data>
abcdef
</data>
</main>
I have written this xml using xml document writer from xml.dom.minidom.
How-ever when i try to parse this and try to fetch data-text value, i get 'abcdef' with spaces/carriage return/newline characters in beg and end.
Does parsing does not take of indenting spaces?
Following is the parsing snippet (ref from net)
dom = parseString(data)
clipTag = dom.getElementsByTagName('clipdata')[0].toxml()
clipData=clipTag.replace('<clipdata>','').replace('</clipdata>','')
Kindly suggest.