| From | Sent On | Attachments |
|---|---|---|
| KenLG | Oct 4, 2008 12:29 pm | |
| Adrian Lynch | Oct 6, 2008 2:08 am | |
| Alexandre Plennevaux | Oct 6, 2008 2:38 am | |
| Erik Beeson | Oct 6, 2008 2:41 am | |
| KenLG | Oct 8, 2008 6:20 pm | |
| Michael Geary | Oct 8, 2008 10:10 pm | |
| KenLG | Oct 14, 2008 10:59 pm | |
| Robert Koberg | Oct 15, 2008 5:16 am | |
| ricardobeat | Oct 15, 2008 8:35 am | |
| KenLG | Oct 15, 2008 5:46 pm |
| Subject: | [jQuery] Re: XML Parsing Question... | |
|---|---|---|
| From: | Alexandre Plennevaux (alex...@lab-au.com) | |
| Date: | Oct 6, 2008 2:38:10 am | |
| List: | com.googlegroups.jquery-en | |
and if you simply try $("EventContact",test).length ?
LAb[au] _ *lab*oratory for *a*rchitecture and *u*rbanism
Alexandre Plennevaux
Lakensestraat 104 Rue de Laeken Brussel 1000 Bruxelles België _ Belgique _ Belgium
tel: +32 (0)2 2196555 fax: +32 (0)2 4266986
mail: alex...@lab-au.com <man...@lab-au.com> http://www.lab-au.com VAT: BE0475.210.720
On Mon, Oct 6, 2008 at 11:09 AM, Adrian Lynch <adel...@googlemail.com>wrote:
JS is case sensitive, maybe .find() is also?
Adrian
On Oct 4, 8:29 pm, KenLG <ken....@gmail.com> wrote:
For much of my app, I'm doing an Ajax hit to the server to grab XML. That works great.
But, in some cases, I've got too many pieces of data (unrelated) that I need to pull so I'm trying to do a simple passthrough from the server side (I'm using ASP.Net). So, I'll either output from SQL Server or hand-stitch some XML and write it to the page.
Whenever I do this passthrough (whether it comes from SQL Server or from my own efforts), the XML doesn't get parsed by Jquery.
For example:
var sTestXML = '<?xml version="1.0"?>\r \n<EventContacts><EventContact><EventContactData>Hello</ EventContactData></EventContact></EventContacts>\r\n';
var test = $(sTestXML);
alert(test.find("EventContact").length);
will result in the alert showing zero.
Now, if I lower case some of the tags (and this will vary from XML doc to XML doc but usually it's the root and object-level tags), it'll work. What's going on here?





