Take the tour ×

I have a problem when trying to parse an XML from a string. I'm using chrome, and the string is written by an websocket. This is the XML from the string:

    <event name="newchannel">
        <calleridname /> <accountcode /> 

The data that I'm trying to get is <calleridnum>0725922523</calleridnum>. With this number, add a new row into a DOM built table (1 row/new event).

This is the jQuery that prints out a new row, but empty:

var nrtel = $(afisare).find("calleridnum").text();

I've tried other examples but they don't print out anything.

Any help would be great.

Thanks, Sebastian

EDIT I get these errors in the Chrome Console

3642Uncaught Syntax error, unrecognized expression: (Presentation Allowed, Not Screened)&lt;/cid-callingpres&gt;
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Just tried it and it just works.

If you've used firebug to test your code, check the nrtel var, you might find that it contains what you want. The semicolons at the end of the line made firebug return undefined.

share|improve this answer
add comment

Your Answer


