No, ignoreWhitespace would be for the internal parts of the text node as
well, not just outside the tags.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jitendra Bigtani
Sent: Tuesday, November 21, 2006 9:18 PM
To: [email protected]
Subject: [flexcoders] Re: XML No trim

 

Thanks Matt for your time.

but reading the documentation I understand that ignoreWhitespace is 
for whitespace outside the tags. 
Also default is true only. but this takes care of whitespace outside 
tags. example 

<Flex>
<Name>
JB </Name> </Flex>

That flag will help parsing above xml with lot of whitespaces 
outside tags. 

but what i am looking for is how not to trim whitespaces inside the 
tags. 
I have value " JB" but its parsed as "JB". I need " JB" after 
parsing. 

Please any suggestions.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> You're doing XML.ignoreWhitespace=true, then new XML(your thing to
> parse)?
> 
> 
> 
> It should work.
> 
> 
> 
> Matt
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Jitendra Bigtani
> Sent: Friday, November 17, 2006 4:56 AM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] XML No trim
> 
> 
> 
> Hi Guys,
> 
> How are you doing?
> 
> I need a help. Its a simple requirement. 
> I need to parse a xml string. But I do not white the whitespace of 
> values inside tags to be trimmed. 
> 
> For example- 
> 
> a maeesage like 
> <Flex><Name> JB</Name></Flex> should come as it is. 
> By default i see the value " JB" is timmed to "JB". 
> 
> I looked at xml properties. 
> I found two related properties. 
> 1. ignoreWhiteSpace. This ignore whitespace outside tags. default 
is 
> true. 
> 2. prettyPrinitng. This default is true. I made it false. This was 
> helpful in sending white space to other xml as it disables 
trimming. 
> 
> Both flags do not solving my problem when I dont want spaces to be 
> trimmed while parsing. 
> 
> Thanks
>

 

Reply via email to