8 Replies - 491 Views - Last Post: 04 April 2012 - 04:44 PM Rate Topic: -----

#1 SubConcussive  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-April 12

Question Loading XML from internet when the values are comma seperated

Posted 02 April 2012 - 06:46 PM

The Website is: http://www.nationsta...gi?q=newnations
I don't know how to load the Information into my program and then I have to use that to go to nationstates.net/nation={the value} and use the "HTMLTextareaELEMENT.value to be a var/string... I then need to be able to virtually click the "Submit" button...I know this is asking a lot but any help...well...helps

Is This A Good Question/Topic? 0
  • +

Replies To: Question Loading XML from internet when the values are comma seperated

#2 maffelu  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 41
  • View blog
  • Posts: 190
  • Joined: 21-August 08

Re: Question Loading XML from internet when the values are comma seperated

Posted 02 April 2012 - 10:05 PM

Uhm, are those real values in the comma separated value? How is "german_pancakes" and "newistan" real countries? :)

Anywho, just use Linq to Xml to parse the XML and then split the value of node NEWNATIONS using string.Split or Regex.Split functions. Regarding pressing the submit button you ought to use javascript for that part as you need to do it client-side rather than server-side.

More information would be useful...
Was This Post Helpful? 0
  • +
  • -

#3 SubConcussive  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-April 12

Re: Question Loading XML from internet when the values are comma seperated

Posted 03 April 2012 - 08:12 AM

View Postmaffelu, on 02 April 2012 - 10:05 PM, said:

Uhm, are those real values in the comma separated value? How is "german_pancakes" and "newistan" real countries? :)

Anywho, just use Linq to Xml to parse the XML and then split the value of node NEWNATIONS using string.Split or Regex.Split functions. Regarding pressing the submit button you ought to use javascript for that part as you need to do it client-side rather than server-side.

More information would be useful...

No...it's a game...thank's for your response
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: Question Loading XML from internet when the values are comma seperated

Posted 03 April 2012 - 09:44 AM

Stupidest. API. Ever. CSV within XML? Friggin' retarded.
Was This Post Helpful? 0
  • +
  • -

#5 SubConcussive  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-April 12

Re: Question Loading XML from internet when the values are comma seperated

Posted 03 April 2012 - 10:16 AM

thank you...I agree...i think...you didn't just call me retarded right?
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: Question Loading XML from internet when the values are comma seperated

Posted 03 April 2012 - 10:26 AM

Not unless you wrote the API. ;)

What's more amazing is that it was apparently changed from a more reasonable output (considering the use of XML) here: http://www.nationsta...gi?newnations=1 to the latest CSV within XML abomination. And...the rest of it is OK. Weird. Maybe some specific reason for it, but it just seems bizarre to me.
Was This Post Helpful? 0
  • +
  • -

#7 SubConcussive  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-April 12

Re: Question Loading XML from internet when the values are comma seperated

Posted 03 April 2012 - 10:43 AM

View PostJackOfAllTrades, on 03 April 2012 - 10:26 AM, said:

Not unless you wrote the API. ;)

What's more amazing is that it was apparently changed from a more reasonable output (considering the use of XML) here: http://www.nationsta...gi?newnations=1 to the latest CSV within XML abomination. And...the rest of it is OK. Weird. Maybe some specific reason for it, but it just seems bizarre to me.


Wow...thanks didn't even see that "link"...makes my life hellava lot easier...anyone of you too know any javascript then?
never bothered to learn it... maybe some tips/links? I don't want to ask any of you to do it for me so...yeah
Was This Post Helpful? 0
  • +
  • -

#8 SubConcussive  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-April 12

Re: Question Loading XML from internet when the values are comma seperated

Posted 04 April 2012 - 02:41 PM

Erm...I can't find anything on how to load up the script itself from the C# project...
Was This Post Helpful? 0
  • +
  • -

#9 SubConcussive  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-April 12

Re: Question Loading XML from internet when the values are comma seperated

Posted 04 April 2012 - 04:44 PM

So This is literally how far I've gotten

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
namespace AutoRec
{


    class Program
    {
        
        static void Main(string[] args)
        {
            XDocument xmlDoc = Xdocument.Load("http://www.nationstates.net/cgi-bin/api.cgi?newnations=1");
            

            

        }

    }
}



what am I supposed to do now? I've truthfully never used xml from online or used this method...always just used the import feature in VS
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1