|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
example.jsp
<html> <body> <script type="text/javascript"> var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=mesh&term=calcium") var NodeData = xmlDoc.selectNodes("eSearchResult/IdList/Id"); moveNode = NodeData.nextNode(); while(moveNode != null){ var a = moveNode.text + ","; document.write(a) moveNode = NodeData.nextNode(); } // Load XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=mesh&id="+a) // Load the XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("mesh.xsl") // Transform document.write(xml.transformNode(xsl)) </script> </body> </html> I want to get all the Id nodes from the url http://eutils.ncbi.nlm.nih.gov/entr...sh&term=calcium Then loop all the Id with while loop then combining all the Id into a String like: var a = 68002118,68020013,68002154,68019831,68044169, ...... Then get the String and combine with another url "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=mesh&id="+a Result is to get the url like http://eutils.ncbi.nlm.nih.gov/entr...019831,68044169, ...... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > How to loop all Id into a String? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|