pondermatic
pondermatic

Reputation: 6583

jquery parsing xml with \n

I'm using jquery to parse some xml. However, the xml has line breaks and spaces in it. E.g.

some item

instead of

some item

When I get the text() of the node, I get "\n some item \n"

Is there some way I get either strip this white space after text() or just get jquery to ignore it while parsing?

Thanks

Upvotes: 1

Views: 743

Answers (1)

pondermatic
pondermatic

Reputation: 6583

I got it: jQuery.trim()

Upvotes: 1

Related Questions