.:: widiya.kumoro ::.

its my life…

Archive for the ‘.NET’ Category

.NET

C#.NET/XML Code Documentation

Posted by oromux on April 10, 2009

Kali ini saya akan bercerita teknis lagi mengenai C#.NET atau XML Code Documentation.

Banyak orang terutama developer atau programmer yang biasa buat code pemrograman sangat tidak suka hukum dokumentasi, karena dokumentasi sangat berbanding terbalik dengan kecepatan produksi suatu aplikasi. Ya, hal itu saya benarkan, tapi jika kita membuat suatu aplikasi demi kepentingan kedepan maksudnya tidak hanya dipakai sekali saja, let say aplikasi yang kita buat akan kita buat versi selanjutnya atau akan ada pengembangan nanti maka saya rasa dokumentasi sangat lah penting.
Untuk developer di perusahaan yang bertipe consulting atau software house, dokumentasi bukan barang yang bisa kita pilih atau tidak kita pilih, tapi adalah suatu kewajiban. dan untuk perusahan end user di IT, menurut saya Read the rest of this entry »

Posted in .NET | Leave a Comment »

vb.net Grabbing Method

Posted by oromux on December 18, 2008

This method use  for grabbing html source/text from the site.

Actually use for get some information from one page of the website. for example, if you want get tax rate info from www.pajak.go.id.

usually, pajak.go.id site not preserve xml data or webservices of this information. so we need grab this data on the fly.  but I am not responsible for the permits. i suggest you to tell the website owner for the permissions.

this is the code:

Private Function GetPageHTML(ByVal strUrl As String) As String
Dim urlx As String = strUrl
Dim htmldoc As New mshtml.HTMLDocument()
Dim htmlresult As mshtml.IHTMLDocument2
Dim iPersistStream As IPersistStreamInit
iPersistStream = DirectCast(htmldoc, IPersistStreamInit)
iPersistStream.InitNew()
htmlresult = htmldoc.createDocumentFromUrl(urlx, vbNullString)
Do Until htmlresult.readyState = “complete”
Application.DoEvents()
Loop
Return htmlresult.body.innerHTML()
End Function

This function return string of html source/text, then you can split the string to get information that you need.

Posted in .NET | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.