For Each .. In resp.getElementsByTagName

irade92

Registered User.
Local time
Today, 05:13
Joined
Dec 26, 2010
Messages
229
I have this probem
<prescription/>
<issued_drug/>
<atc_code>ABC11</atc_code>
<fund_code>1122</fund_code>
</issued_drug>
</prescripron>

<prescription/>
<issued_drug/>
<atc_code>XXC12</atc_code>
<fund_code>5533</fund_code>
</issued_drug>
</prescripron>

<prescription/>
<issued_drug/>
<atc_code>VVC17</atc_code>
<fund_code>2244</fund_code>
</issued_drug>
</prescripron>

I want to retreive fund_code and to put it into a table..Putting it into a table is not a problem..but how to retreive with this

For Each prescription In resp.getElementsByTagName("prescription")

Please help
 
Hi. What’s wrong? Are you using nodeValue and you’re not getting the value? If so, try it this way:
Code:
prescription.selectSingleNode(“fund_code”).Childs[0].nodeValue
 
Hi. What’s wrong? Are you using nodeValue and you’re not getting the value? If so, try it this way:
Code:
prescription.selectSingleNode(“fund_code”).Childs[0].nodeValue

Thanks a lot..I think I solved this ..I thought so!!! but not...sorry
 
Last edited:
Thanks a lot..I think I solved this ..

It is considered only courteous to explain/show the code on how it was solved.?

That way it could help others.?
 
Hi. What’s wrong? Are you using nodeValue and you’re not getting the value? If so, try it this way:
Code:
prescription.selectSingleNode(“fund_code”).Childs[0].nodeValue

this does not work...fund_code is a child of issued_drug ..tried with another brakets but not work..
 
this does not work...fund_code is a child of issued_drug ..tried with another brakets but not work..
Oh, sorry, didn't notice that. Still no guarantees, but try it this way then:
Code:
prescription.selectSingleNode("./issued_drug/fund_code").Childs[0].nodeValue
Hope it helps...
 
Oh, sorry, didn't notice that. Still no guarantees, but try it this way then:
Code:
prescription.selectSingleNode("./issued_drug/fund_code").Childs[0].nodeValue
Hope it helps...

see the pict..there is somewhere a problem with the silly child
 

Attachments

  • 2019-02-25_19-59-02.jpg
    2019-02-25_19-59-02.jpg
    37 KB · Views: 122
Sorry. I was using my phone to post earlier. Please try this...
Code:
prescription.selectSingleNode("./issued_drug/find_code").childNodes[0].nodeValue
Hope it gets you closer...
 
sorry. I was using my phone to post earlier. Please try this...
Code:
prescription.selectsinglenode("./issued_drug/find_code").childnodes[0].nodevalue
hope it gets you closer...

yes..you did it..thanks
 
Hi. Congratulations! Glad to hear you finally got it to work. Sorry, it's hard to offer code to try without being able to test it first. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom