wikipedia

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pitaridis Aristotelis

    #1

    wikipedia

    There is a free encyclopedia called wikipedia
    (http://wikimediafoundation.org/). Does anyone knows how to use it in order
    to get various articles for diplaying them in my application?


  • Spam Catcher

    #2
    Re: wikipedia

    "Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
    news:1160551474 .444714@athnrd0 2:
    There is a free encyclopedia called wikipedia
    (http://wikimediafoundation.org/). Does anyone knows how to use it in
    order to get various articles for diplaying them in my application?

    If you have .NET 2.0, you can use the web browser control to fetch web
    pages.

    In .NET 1.1 you'll have to use a wrapper class to access web pages.

    Wikipedia also provides content in XML files ... so you could render the
    content using the XML files too.

    Comment

    • Pitaridis Aristotelis

      #3
      Re: wikipedia

      Both ways are very interesting. Where can I find information about this,
      especially for the XML way???

      Ï "Spam Catcher" <spamhoneypot@r ogers.comÝãñáøå óôï ìÞíõìá
      news:Xns985974E BEDEF1usenethon eypotrogers@127 .0.0.1...
      >
      "Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
      news:1160551474 .444714@athnrd0 2:
      >
      >There is a free encyclopedia called wikipedia
      >(http://wikimediafoundation.org/). Does anyone knows how to use it in
      >order to get various articles for diplaying them in my application?
      >
      >
      If you have .NET 2.0, you can use the web browser control to fetch web
      pages.
      >
      In .NET 1.1 you'll have to use a wrapper class to access web pages.
      >
      Wikipedia also provides content in XML files ... so you could render the
      content using the XML files too.

      Comment

      • Spam Catcher

        #4
        Re: wikipedia

        "Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
        news:1160634267 .217299@athprx0 4:
        Both ways are very interesting. Where can I find information about this,
        especially for the XML way???
        AFAIK, Wikipedia provides data in XML files which are dumped daily? They're
        massive - couple gigabytes.

        There is also a per page export utilty:



        I'm sure Wikipedia has other "hidden" APIs too :-)

        Comment

        • Spam Catcher

          #5
          Re: wikipedia

          Spam Catcher <spamhoneypot@r ogers.comwrote in
          news:Xns985AEFD 7DF350usenethon eypotrogers@127 .0.0.1:
          "Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
          news:1160634267 .217299@athprx0 4:
          >
          >Both ways are very interesting. Where can I find information about
          >this, especially for the XML way???
          >
          AFAIK, Wikipedia provides data in XML files which are dumped daily?
          They're massive - couple gigabytes.
          >
          There is also a per page export utilty:
          >

          >
          I'm sure Wikipedia has other "hidden" APIs too :-)

          More info here:






          Comment

          • Pitaridis Aristotelis

            #6
            Re: wikipedia

            I found a way to get the xml result, but I have no idea about xml. Can
            someone write a function which will get only the text which contains the
            article?
            Thanks

            Ï "Spam Catcher" <spamhoneypot@r ogers.comÝãñáøå óôï ìÞíõìá
            news:Xns985AF06 FFA80Cusenethon eypotrogers@127 .0.0.1...
            >
            Spam Catcher <spamhoneypot@r ogers.comwrote in
            news:Xns985AEFD 7DF350usenethon eypotrogers@127 .0.0.1:
            >
            >"Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
            >news:116063426 7.217299@athprx 04:
            >>
            >>Both ways are very interesting. Where can I find information about
            >>this, especially for the XML way???
            >>
            >AFAIK, Wikipedia provides data in XML files which are dumped daily?
            >They're massive - couple gigabytes.
            >>
            >There is also a per page export utilty:
            >>
            >http://en.wikipedia.org/wiki/Special:Export/
            >>
            >I'm sure Wikipedia has other "hidden" APIs too :-)
            >
            >
            More info here:
            >

            >

            >
            http://download.wikimedia.org/

            Comment

            • Spam Catcher

              #7
              Re: wikipedia

              "Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
              news:1160724301 .213283@athprx0 3:
              I found a way to get the xml result, but I have no idea about xml. Can
              someone write a function which will get only the text which contains the
              article?
              Thanks

              Yes. Take a look at System.XML namespace.

              Comment

              • Pitaridis Aristotelis

                #8
                Re: wikipedia

                I have used the following code but it does not work

                Doc.Load("http://en.wikipedia.or g/wiki/Special:Export/test")
                If Doc.SelectNodes ("/mediawiki/page/revision/text").Count 0 Then
                Dim output As String =
                Doc.SelectNodes ("/mediawiki/page/revision/text").Item(0). InnerText
                End If

                The structure of the xml file is like this

                <mediawiki xmlns="http://www.mediawiki.o rg/xml/export-0.3/"
                xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocat ion="http://www.mediawiki.o rg/xml/export-0.3.xsd"
                version="0.3" xml:lang="en">
                <siteinfo>
                <sitename>Wikip edia</sitename>
                <base>http://en.wikipedia.or g/wiki/Main_Page</base>
                <generator>Medi aWiki 1.9alpha</generator>
                <case>first-letter</case>
                <namespaces>
                <namespace key="-2">Media</namespace>
                <namespace key="-1">Special</namespace>
                <namespace key="0" />
                <namespace key="1">Talk</namespace>
                <namespace key="2">User</namespace>
                <namespace key="3">User talk</namespace>
                <namespace key="4">Wikiped ia</namespace>
                <namespace key="5">Wikiped ia talk</namespace>
                <namespace key="6">Image</namespace>
                <namespace key="7">Image talk</namespace>
                <namespace key="8">MediaWi ki</namespace>
                <namespace key="9">MediaWi ki talk</namespace>
                <namespace key="10">Templa te</namespace>
                <namespace key="11">Templa te talk</namespace>
                <namespace key="12">Help</namespace>
                <namespace key="13">Help talk</namespace>
                <namespace key="14">Catego ry</namespace>
                <namespace key="15">Catego ry talk</namespace>
                <namespace key="100">Porta l</namespace>
                <namespace key="101">Porta l talk</namespace>
                </namespaces>
                </siteinfo>
                <page>
                <title>Play</title>
                <id>22962</id>
                <revision>
                <id>79448292</id>
                <timestamp>20 06-10-04T13:00:19Z</timestamp>
                <contributor>
                <username>JonHa rder</username>
                <id>629503</id>
                </contributor>
                <comment>revert : not seeing why this article should be exempt from citing
                sources.</comment>
                <text xml:space="pres erve">XXXXXX this is the part that I want to get
                XXXXXX</text>
                </revision>
                </page>
                </mediawiki>

                Ï "Spam Catcher" <spamhoneypot@r ogers.comÝãñáøå óôï ìÞíõìá
                news:Xns985B753 C7FFE4usenethon eypotrogers@127 .0.0.1...
                >
                "Pitaridis Aristotelis" <pitaridis@hotm ail.comwrote in
                news:1160724301 .213283@athprx0 3:
                >
                >I found a way to get the xml result, but I have no idea about xml. Can
                >someone write a function which will get only the text which contains the
                >article?
                >Thanks
                >
                >
                Yes. Take a look at System.XML namespace.

                Comment

                Working...