View Full Version : Get full content of a dom node

25 Apr 2012, 7:14 AM
I'm trying to parse the content of a dom node , but I can't get the full content of a node if contain other elements, it only give me the first part

my "msg" variable contains this as raw data

<msg>Hi,<br/>how are you?<br/>cheers</msg>

using Ext.DomQuery.selectValue("/", msg)

All i get is "Hi,"

what I want is "Hi,<br/>how are you?<br/>cheers"

what I'm trying to do is to parse that html inside the html of a panel.

any idea?

2 May 2012, 12:59 PM
See if this will work:

<msg>Hi,<br/>how are you?<br/>cheers</msg>

var val = Ext.query('msg');



3 May 2012, 5:11 AM
Hi Scott, thanks for the reply

I'm not sure how this could apply to my situation, my XML data first came from a form store. I used

Ext.DomQuery.select("/msg", form.store.proxy.reader.rawData);

to populate an array variable caled MSG, then i loop through that .

Also, Ext.Query seem to return a DOM.

What I as wondering is if there is a way to get the full node content as a string? The issue is that because <msg> containt text and tag and text and tag... I can never get the full content, I have to loop through the content of msg and it seems like a pain for a simple task.