harrypottar
12 Apr 2012, 9:07 AM
Still new to all this so learning as I go, moving from Flex to ExtJs
I have a model with some model associations loading from an XML file.
All working but I wondered what would be the best way to deal white space.
Some of the text nodes have nested data (loading into the associations)
for example:
<search >Search:
<search-options>
<online>OnLine</online>
<archives>Archives</archives>
<both>Online and Archives</both>
</search-options>
</search>
When I look at the model field for search, I get the text as expected but I get a bunch of white space and a new line.
I know I could create a new model field with a mapping function and use Ext.String.trim() which would trim the search field.
However is there a config to condense white space when reading xml or is there a more efficient way to trim the filed with out using a mapping function
I have a model with some model associations loading from an XML file.
All working but I wondered what would be the best way to deal white space.
Some of the text nodes have nested data (loading into the associations)
for example:
<search >Search:
<search-options>
<online>OnLine</online>
<archives>Archives</archives>
<both>Online and Archives</both>
</search-options>
</search>
When I look at the model field for search, I get the text as expected but I get a bunch of white space and a new line.
I know I could create a new model field with a mapping function and use Ext.String.trim() which would trim the search field.
However is there a config to condense white space when reading xml or is there a more efficient way to trim the filed with out using a mapping function