Click here to Skip to main content
15,069,020 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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...

C#
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;
}


SQL
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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900