Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Tuesday, February 9, 2016

XML - Display XML in browser in Graphical Form Using CSS

XML stands for EXtensible Markup Language.
XML was designed to store and transport data.
XML was designed to be both human- and machine-readable.








XML Document:-


<?xml-stylesheet type="text/css" href="xmlstyle.css"?>
<personal_info>
Thats My Personal Information:- 
<self_intro>
It Show Only Self introduction:-
<name>Name: Hafiz Muhammad Usman Siddique</name>
<mob_no>Mob No: 03075230948</mob_no>
</self_intro>
<education>
It show some Educational introduction:-
<reg_no>Reg No: FA13-BSE-080</reg_no>
<university>University : Comsats Wah Campus</university>
</education>

</personal_info>

CSS File:-


personal_info{color:red;font-weight: bold;border: 1px solid black;width: 24%;padding: 20px;margin: 20px;text-decoration: underline;
}
self_intro{color:green;display: block;padding: 10px;text-decoration: none;
}
name{color:blue;display: block;padding-left: 20px;
}
mob_no{color:orange;display: block;padding-left: 20px;
}
education{color:brown;display: block;padding: 10px;
}
reg_no{color:pink;display: block;padding-left: 20px;
}
university{color:black;padding-left: 20px;
}

Saturday, October 24, 2015

Measurement Scales Converter in vb.net


Vb.net Code:-

Public Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a As Single
        Dim b As Single

        Dim c As Single
        Dim inch As Single
        Dim yard As Single
        Dim meter As Single
        Dim fathom As Single
        Dim rod As Single
        Dim furlong As Single
        Dim kilometer As Single
        Dim mile As Single
        Dim foot As Single
        yard = 3
        meter = 3.28155
        fathom = 6
        rod = 16.5
        furlong = 660
        kilometer = 32815
        mile = 5280
        If Val(TextBox1.Text) = 1 Then
            a = inch
        End If
        If TextBox1.Text = 2 Then
            a = yard
        End If
        If TextBox1.Text = 3 Then
            a = meter
        End If
        If TextBox1.Text = 4 Then
            a = fathom
        End If
        If TextBox1.Text = 5 Then
            a = rod
        End If
        If TextBox1.Text = 6 Then
            a = furlong
        End If
        If TextBox1.Text = 7 Then
            a = kilometer
        End If
        If TextBox1.Text = 8 Then
            a = mile
        End If
        If Val(TextBox2.Text) = 1 Then
            b = inch
        End If
        If TextBox2.Text = 2 Then
            b = yard
        End If
        If TextBox2.Text = 3 Then
            b = meter
        End If
        If TextBox2.Text = 4 Then
            b = fathom
        End If
        If TextBox2.Text = 5 Then
            b = rod
        End If
        If TextBox2.Text = 6 Then
            b = furlong
        End If
        If TextBox2.Text = 7 Then
            b = kilometer
        End If
        If TextBox2.Text = 8 Then
            b = mile
        End If
        c = Val(TextBox3.Text) * a

        Dim ans As Integer

        ans = c / b
        TextBox4.Text = ans




    End Sub
End Class




Form:-



HTML CODE:-