Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript XML HTML
Hi! I am using javascript to retrieve the values and the values are in XML document form. I am using this to retrieve the values:
 
var vartitle = xmldoc.getElementsByTagName("TITLE");
 
var imagePoint = xmldoc.getElementsByTagName("IMAGEPOINT");
 
The vartitle is retrieving data correctly but the imagePoint is not... means the imagepoint has got other values within it like
 
<TITLE>SHIMLLLLAAA</TITLE>
 
<IMAGEPOINT>    <UPATTACHID>894</UPATTACHID>    <UPFILENAME>114002006201212354088.JPEG</UPFILENAME>    <UPFILEPATH>E:\NEWQLIXOOMAY3\QLIXOOUPDATEDONE\QLIXOO\STORAGE/1140</UPFILEPATH>    <UPFILETYPE>IMAGE</UPFILETYPE>    <LATITUDE>24.804644265416272</LATITUDE>    <LONGITUDE>77.882904600000074</LONGITUDE>    <UPDISPLAYFILENAME>114002006201212354088.JPEG</UPDISPLAYFILENAME>    <UPUPLOADEDBY>1140</UPUPLOADEDBY>    <UPFILEDATE>2012-06-20T12:35:41.223+05:30</UPFILEDATE>    <UPJOURNEYID>355</UPJOURNEYID>    <STATUS>TAGGED</STATUS>  </IMAGEPOINT>
 

Also to convert the string value to XML i am using this...
 
        xmldoc = StringtoXML(text);
StringtoXML function is as follows...
 
function StringtoXML(text){
    if (window.ActiveXObject){
      var doc=new ActiveXObject('Microsoft.XMLDOM');
      doc.async='false';
      doc.loadXML(text);
    } else {
      var parser=new DOMParser();
      var doc=parser.parseFromString(text,'text/xml');
    }
    return doc;
}
 
so... i am not able to find out why it is accessing the TITLE of XML but not this IMAGEPOINT can u please help me....
 
Thanking You in advance!!
Posted 20-Jun-12 21:00pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 21 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100