Hi again Chip: below is some code I extracted for you to look at.
I built a vb.net app that will display xml or an rss feed (xml or xbrl) in a
TextBox.
Below I download the xml file and load it into a Document Object I keep in a
"Globals" class.
Then I show the form with the TextBox which just assigns the XML Document
contents to a TextBox for viewing.
The xml document is held in my Global Variable named "Doc".It was a down and
dirty app to use to analyze if I was getting xbrl from the Securities and
Exchange Commission and to check out the format of the xml in the RSS Feed.
I thought you might be interested in seeing how http was used in the .net
environment and how I assigned the returned xml to a xml document for
viewing.
This is how you can handle RSS Feeds in it's raw format. You put the url to
the RSS Feed in the URL of the HTTP Request and the sxml for the feed is
returned in the Response object.
Public Class RootForm
' Below loads the document and shows the second form with the textbox to
display the xml or rss feed on it.
Private Sub ViewDocumentMenuItem_Click( ByVal sender As System.Object,
ByVal e As System.EventArgs) _
Handles ViewDocumentMenuItem.Click
LoadXMLFile()
FormsLib.instViewDocumentForm.Show()
End Sub
Private Sub LoadXMLFile()
MethodID = "LoadXMLFileMenuItem_Click"
Dim FileLoaded As Boolean = False
Dim httpString As String = _
"http://www.sec.gov/Archives/edgar/data/99106/000151316212000983/tlx-20120930.xml"
' "http://www.sec.gov/Archives/edgar/usgaap.rss.xml"
Try
Dim myRequest As WebRequest = WebRequest.Create( httpString )
Dim myResponse As WebResponse = myRequest.GetResponse()
Dim rssStream As Stream = myResponse.GetResponseStream()
Globals.Doc = New XmlDocument
Globals.Doc.Load( rssStream )
MessageBox.Show( "Globals.Doc should be loaded")
Catch Ex As Exception
Logger.WriteLine( "Error loading doc in rootform")
Logger.WriteLine( ex.ToString())
Exit Sub
End Try
End Sub
End Class
----- Original Message -----
From: "RicksPlace" <[email protected]>
To: <[email protected]>
Sent: Friday, December 21, 2012 5:38 AM
Subject: Re: new wiki article on using XML to get info from a web site
Hi Chip: These protocols and Communications methods can get pretty
involved.
I dont know much about them other than to figure out how to use them when
I need to and am in no way expert enough to write an article about them.
the .net Framework handles the various Communications Formatting via some
classes which are not available in native VBS as far as I know, although
since they are not UI controls they actually may be.
XBRL is the new standard for Financial Reporting communications and
involves passing xml objects around the internet using pre-defined
schemas. It is being used by Governments and are required to be used by
companies reporting to the Securities and Exchange Commission as of
recently.
All filings are maintained on the Government SEC Website in a Database
called the EDGARh Database.
I am able to download the necessary info using ftp or rss but parsing the
data is massively complicated and there isnt much out there to help in
that process for a .net application.
One project Gepsio, is available but it is on CodePlex and I cant
communicate with the manager (the discussion form is not accessible) so I
am waiting to hear from CodePlex before I can even contact him to see if I
can use his project and, or, get involved.
It is possible to do communications from VBS I think but it may require
using other languages to access or format the necessary protocols since I
dont recall seeing anything in native vbs about handling RSS Feeds or
Formatting various API Protocol responses. There may be modules in Windows
to do all this but I dont know 1/100 th as much as you do about vbs so
wouldnt even begin to know where to look.
Besides, my current project is taking up about 12 hours per day!
Well, later and your article does give the folks a good starting point and
the necessary key objects to start researching. the HTTPRequest and
Response objects are the backbone of almost any of the methods of
communications across the net so they can google to find out more and
perhaps create some articles. I might get involved some day but I am
really, really tied up currently.
Rick USA
----- Original Message -----
From: "Chip Orange" <[email protected]>
To: <[email protected]>
Sent: Thursday, December 20, 2012 9:16 PM
Subject: RE: new wiki article on using XML to get info from a web site
Thanks Rick. Looks like the link broke in the middle.
Everyone should just go to the wiki page at:
http://gwmicro.com/wiki
and from there just bring up the list of links. The article will be
listed
as a link starting with "getting ...", and so it's completely easy to
find,
and introduces everyone to the GW Micro wiki.
I'm afraid I don't know what SEC Edgar and xbrl is that you are
struggling
with? I doubt I can help, as this article really is just an
"introduction"
meant for those who have never interfaced an app with the internet
before.
Probably each internet technology and topic deserves its own article to
keep
them from getting too large and cumbersome.
What I'd really like is for someone with experience in use of JSON with
VBScript to add a section on this. I know Jamal wrote a library app
designed to make it easy to translate a JSON object into a standard com
object usable by VBScript, but it's no longer supported as far as I know,
and has little documentation. Would be great if someone showed how a
VBScript app might use this or some other technique to get JSON info.
Chip
-----Original Message-----
From: RicksPlace [mailto:[email protected]]
Sent: Thursday, December 20, 2012 5:44 AM
To: [email protected]
Subject: Re: new wiki article on using XML to get info from a web site
Hi Chipper:
I went to that url but found:
,
search
There is currently no text in this page. You can
search for this page title
in other pages, or
search the related logs
.
Clicking search for this title in other pages did find the article but
is
it suppose to be on this page or, perhaps the index?
I will read through it to see if I have anything. I do most of my http
and
ftp work from within the .net environment but it appears very similar
from
the initial reading of some of the article.
Note that I am currently struggling with the SEC Edgar FTP and RSS xbrl
instance ddownloads and directories so your post is somewhat relevant to
what I am working on.
I can use ftp and rss fairly well using the .net framework classes and
will
continue reading your article to see if there is anything I can
contribute
since the Windows ftp and http operations seem very similar.
I thought I would just give you a heads up before too many folks look
for
the article and find the empty article message.
Rick USA.
----- Original Message -----
From: "Chip Orange" <[email protected]>
To: <[email protected]>
Sent: Wednesday, December 19, 2012 2:42 PM
Subject: new wiki article on using XML to get info from a web site
> Hi all,
>
> I've started a new wiki article: "Getting Information From a Web Site
Into
> an App" at:
>
>
http://www.gwmicro.com/mediawiki/index.php?title=Getting_Information
_From_a_
> Web_Site_into_an_App
>
> It introduces the topic of using HTTP from an app, and using the XML
> DOM
> to
> analyze returned XML information. I'd appreciate if others would edit
and
> correct if they are more familiar with the topic, or send me your
> info,
> suggestions, corrections, or requests, and I'll perform the editing
> for
> you.
>
> Thanks.
>
> Chip
>
>