I did update on my question since i know more clearly on the technicality i am trying to address.
A. If we take the resulting URL from a search on a data agency's site we get this
https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000010795&type=10-K&dateb=&owner=exclude&count=20
B. By entering the URL of Step A into a Browser and going to the source code we see at line No. 100 (I use Google Chrome) this charming line which is also a clickable link:
href="/Archives/edgar/data/10795/000119312513456802/0001193125-13-456802-index.htm"
the line is contained in this code snippet of our source code:
<tr>
<td nowrap="nowrap">10-K</td>
<td nowrap="nowrap"><a href="/Archives/edgar/data/10795/000119312513456802/0001193125-13-456802-index.htm" id="documentsbutton"> Documents</a> <a href="/cgi-bin/viewer?action=view&cik=10795&accession_number=0001193125-13-456802&xbrl_type=v" id="interactiveDataBtn"> Interactive Data</a></td>
<td class="small" >Annual report [Section 13 and 15(d), not S-K Item 405]<br />Acc-no: 0001193125-13-456802 (34 Act) Size: 15 MB </td>
<td>2013-11-27</td>
<td nowrap="nowrap"><a href="/cgi-bin/browse-edgar?action=getcompany&filenum=001-04802&owner=exclude&count=20">001-04802</a><br>131247478 </td>
</tr>
C. If we click on line 100 the link of step A, we go to the next page and the link of step A now becomes part of the URL! So what we get is a new page assigned to this URL:
https://www.sec.gov/Archives/edgar/data/10795/000119312513456802/0001193125-13-456802-index.htm
D. With use of the same methodology we meet in line No. 182 this line of code
href="/Archives/edgar/data/10795/000119312513456802/bdx-20130930.xml"
if we click the line we get to the strXMLSite
which is on the macro below. Once you take a look at the macro and run it, you will understand that it is a logical conclusion that the String could populated with the desired URL on runtime, if we could integrate a relevant procedure into our macro. That is the nucleus of the question.
We have activated the needed for the macro Microsoft XML Core Services (MSXML) (Excel --> VBE --> Tools --> References --> Microsoft XML, v6.0) needed for the procedure.
How can we make VBA Crawl from the URL which is on Step A through the source-code to the URL that is now on strXMLSite
String by adding statements to the procedure? Do we need to activate a library from Tools--> References? Can you show me a code block using such a methodology? What is the line of approach on this point?
For reasons of completeness allow me to provide the macro courtesy of @user2140261
Sub GetNode()
Dim strXMLSite As String
Dim objXMLHTTP As MSXML2.XMLHTTP
Dim objXMLDoc As MSXML2.DOMDocument
Dim objXMLNodexbrl As MSXML2.IXMLDOMNode
Dim objXMLNodeDIIRSP As MSXML2.IXMLDOMNode
Set objXMLHTTP = New MSXML2.XMLHTTP
Set objXMLDoc = New MSXML2.DOMDocument
strXMLSite = "http://www.sec.gov/Archives/edgar/data/10795/000119312513456802/bdx-20130930.xml"
objXMLHTTP.Open "POST", strXMLSite, False
objXMLHTTP.send
objXMLDoc.LoadXML (objXMLHTTP.responseText)
Set objXMLNodexbrl = objXMLDoc.SelectSingleNode("xbrl")
Set objXMLNodeDIIRSP = objXMLNodexbrl.SelectSingleNode("us-gaap:DebtInstrumentInterestRateStatedPercentage")
Worksheets("Sheet1").Range("A1").Value = objXMLNodeDIIRSP.Text
End Sub
thank you for watching my question
See Question&Answers more detail:os