Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16701
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Display XML content in HTML page |
| Date | 2012-10-18 07:41 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k5o4pt$7jn$1@speranza.aioe.org> (permalink) |
| References | <1a067dc0-9d64-4b7c-ba61-736bf747bb78@googlegroups.com> <k5mrtl$fqk$2@speranza.aioe.org> <a5bc3e3a-3e99-4036-82a4-46af06387736@googlegroups.com> |
W dniu 2012-10-18 06:38, Pervez Mulla pisze:
> On Wednesday, October 17, 2012 11:33:37 PM UTC+5:30, Cezary Tomczyk wrote:
>> W dniu 2012-10-17 14:23, Pervez Mulla pisze:
>>
>>> Hi,
>>
>>>
>>
>>> I am newbie , I have application in which check-box tree is present.
>>
>>> I want to pre-populate the check-box's if user before checked some of
>>
>>> those check box.
>>
>>>
>>
>>> For that am getting XML format from my back-end perl script as shown
>>
>>> below.like , in below XML only 0, 43,44,45,46 and 50 are coming so
>>
>>> only those respective checkbox need to checked on page load.I want to
>>
>>> display those checked check-box on page load .How can I do this
>>
>>> .......?
>>
>>>
>>
>>> I tried with so many examples . but am not getting solution for my
>>
>>> problem .Below is my XML format data which is am getting from perl
>>
>>> script .
>>
>> [...]
>>
>>
>>
>> Maybe this could help you:
>>
>>
>>
>> var parseXml;
>>
>>
>>
>> if (typeof window.DOMParser !== "undefined") {
>>
>> parseXml = function (xmlStr) {
>>
>> return (new window.DOMParser()).parseFromString(xmlStr,
>>
>> "text/xml");
>>
>> };
>>
>> } else if (typeof window.ActiveXObject !== "undefined" && new
>>
>> window.ActiveXObject("Microsoft.XMLDOM")) {
>>
>> parseXml = function (xmlStr) {
>>
>> var xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM");
>>
>> xmlDoc.async = "false";
>>
>> xmlDoc.loadXML(xmlStr);
>>
>> return xmlDoc;
>>
>> };
>>
>> } else {
>>
>> throw new Error("No XML parser found");
>>
>> }
>>
>>
>>
>> --
>>
>> Cezary Tomczyk
>>
>> http://www.ctomczyk.pl/
>
> Hi Cezary Tomczyk,
Hi,
> Yeah I can change that to get JSON data too in terms of key/value pair.
So, then you will not need an XML parser :-) Just get key/value from JSON.
> Please can u give me example which suits my requirement......?
Try to prepare some sample code on http://jsfiddle.net/, because I
cannot understand your whole idea. Maybe I missed something.
As for XML just wanted to note that you can get XML as a string and then
parse using build-it XML parser.
According to parsing XML this maybe interesting for you yet:
http://www.steveborn.com/codenotes/LoadingXML.htm
http://help.dottoro.com/ljssopjn.php
--
Cezary Tomczyk
http://www.ctomczyk.pl/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Display XML content in HTML page Pervez Mulla <mullapervez@gmail.com> - 2012-10-17 05:23 -0700
Re: Display XML content in HTML page Jim T. <x@y.z> - 2012-10-17 09:11 -0400
Re: Display XML content in HTML page Jim T. <x@y.z> - 2012-10-17 09:20 -0400
Re: Display XML content in HTML page Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-17 10:24 -0700
Re: Display XML content in HTML page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-17 20:05 +0200
Re: Display XML content in HTML page Jim T. <x@y.z> - 2012-10-17 21:31 -0400
Re: Display XML content in HTML page Pervez Mulla <mullapervez@gmail.com> - 2012-10-17 21:42 -0700
Re: Display XML content in HTML page Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-17 15:39 +0200
Re: Display XML content in HTML page Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-10-17 20:03 +0200
Re: Display XML content in HTML page Pervez Mulla <mullapervez@gmail.com> - 2012-10-17 21:38 -0700
Re: Display XML content in HTML page Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-10-18 07:41 +0200
Re: Display XML content in HTML page Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-29 12:09 +0100
Re: Display XML content in HTML page Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-09 23:03 +0100
Re: Display XML content in HTML page Danny <dann90038@gmail.com> - 2012-10-17 13:19 -0700
Re: Display XML content in HTML page Bart Van der Donck <bart@nijlen.com> - 2012-10-31 00:50 -0700
csiph-web