Where I live the local transport service has this page where you can read about delays and disturbances in the traffic. I would like to parse this page so I can store this data and make a nice report of it.
The problem is that to be able to get the information you need to submit a form by making some choices and clicking a button. You can't just visit the page.
How can I get the information "behind" the form from code so that I can parse it?
I'd like to know one (or more) ways to parse the HTML page output. I'd like to detect some patterns on the HTML that will be send to the client and log some info if present.
I want to parse and page that takes POST parameters. like this is my scenario. i have to parse some search results. but the search parameter are sent in post body to that page. To parse the search result i have to send parameters to that page in POST. how i can do that with agility pack ?
I can use the TextFieldParser Class to parse the text of a file in the file system (given the abslolute path) but it won't parse text from a file whose location is identified by a URI.
The question is not really about parsing the HTML, but rather parsing the HTML and adding elements to the DOM according to the HTML tags. For example - I want to be able to take an HTML page, add attribute to the HTML tags - such as "class='replace'", put some PHP/ASPNET code in the page (make an ASPX page with ASPNET or put some include with PHP) and make them parse the page every time it is accessed and manipulate the DOM of the tags marked as 'class="replace".
For example if I have < div class='replace'>< /div>, after I run the script I'll get something like < div class='replace'>This is a new text< /div>
I want to parse an address from a text field. for example
textbox data = 123 test street, mountain view, CA 91302 Dim address = Address.text parse(address) to Address1 Address2 City State Zip
I found someones sample code, but it doesn't work all that well. here it is non the less
Public Function parseAddress(ByVal input As String) As Collection input = input.Replace(",", "") input = input.Replace(" ", " ") Dim splitString() As String = Split(input) Dim streetMarker() As String = New String() {"street", "st", "st.", "avenue", "ave", "ave.", "blvd", "blvd.", "highway", "hwy", "hwy.", "box", "road", "rd", "rd.", "lane", "ln", "ln.", "circle", "circ", "circ.", "court", "ct", "ct."} Dim address1 As String Dim address2 As String = "" Dim city As String Dim state As String Dim zip As String Dim streetMarkerIndex As Integer zip = splitString(splitString.Length - 1).ToString() state = splitString(splitString.Length - 2).ToString() streetMarkerIndex = getLastIndexOf(splitString, streetMarker) + 1 Dim sb As New StringBuilder For counter As Integer = streetMarkerIndex To splitString.Length - 3 sb.Append(splitString(counter) + " ") Next counter city = RTrim(sb.ToString()) Dim addressIndex As Integer = 0 For counter As Integer = 0 To streetMarkerIndex If IsNumeric(splitString(counter)) _ Or splitString(counter).ToString.ToLower = "po" _ Or splitString(counter).ToString().ToLower().Replace(".", "") = "po" Then....
I just uploaded files to my website and am getting a parser error when it comes to the Inherits word. If the exact error , you can look at [URL] the required dll is located at [URL] if it i got the web host godaddy sells. Also I thought it would be worth noting that if I remove the Inherits from the page there is no error.
i have an html (save in a string variable if needed) and i want to use the content of one of the html's tables (the html page has 4 tables an i want only one of them) . i read a lot of similar post but i didn't find anything helpful. on how to parse the html and get the content of one of the tables so i can use this data later?
I have a String that contains the following: ?workarea=London+&+Home+Counties+Ltd&sub=fs&&&FASh*5which resembles a URI query string. What is the best way to parse the elements of this string (workarea and sub) without messing about with string manipulation?If I use HttpUtility.ParseQueryString is gets stuck as both elements include &. However if I encode the whole thing first I lose the seperations of the elements. Ideally the output would be:workarea = London & Home Counties Ltdsub = fs&&&FASh*5
The data being passed to the C# function looks like:
lbItems=1&lbItems=3&lbItems=5
Is there any built-in C# function that can deserialize that easily, to convert the values into an array of some sort? Or maybe there's a better way to pass the data from jQuery?
I am trying to parse out the date in datetime function. For example, I have 1/2/2010 and would like to parse out the day, month and year into different variables.
sDatetime = 1/2/2010 sDay = 1 sMonth = 2 sYear= 2010. Also I would like the day to be shown as 01 not just "1".
I could use the DataContractJsonSerializer Class and have custom Classes defined. However, am not sure how keys like "$" would get converted to in .Net.
For Each i need <ns1:PricedItinerary> Node there exists a <formdata> node and i need to get that formdata node datas alone and append to my next request..
Hope this is the right forum to ask. I am trying to write a simple mobile application with two form fields that POST to a webservice that queries an SQL database and comes back with an XML file that needs to be parsed and displayed properly in a browser.
So what I have is a webservice .asmx file that is working properly and an HTML form that POST two variables to the webservice file. The result is the generated XML. I simply just need to know the simplest way to display parts of that data as output within the design of the form page.
Here is the HTML form: http://www.bt4u.org/ And here is the web service: http://www.bt4u.org/BT4U/BT4U_WebService.asmx
If you enter in the following respectively you will see the XML file:
MSS-1607 HWD-2104
there is some sort of class that stores the XML in an array or some such thing that can then be manipulated
I am creating a web app in ASP.NET with VB code behind. I would like it so that a user can input a url ("[URL]") and then when the user presses the GO button, I want the system to interprete the [URL] page (without navigating to it), look in the HTML source, and store all data that is present within the URL's <p></p> tags...is this possible?
I have noticed a similar thing present on [URL]. When you submit an article to [URL], it automatically looks at the URL's <meta name="description" content="" /> in the URL HTML file. I would like to do a similar thing, but instead extract all text between all <p></p> tags.
Exploring the feasibility of something here... We have a UI page in the mvc3 web-application that the admin will use to upload a 'csv' file. Is it possible to have an SSIS package that will be called by the application..that will validate/transform all these data and store into db if its all valid or throw back error details to application if there are invalid data?
Just trying to leverage the capabilities of SSIS to do the parsing of file and transformation of data. If this is not possible, is there a better way?
update: yes, need to execute ssis on the fly.. and give back a message on the UI page. telling the'uploader' if his upload failed or not based on message that SSIS would give back to the application.