Documente Academic
Documente Profesional
Documente Cultură
on integers
Control Label1 Label2 Label3 Textbox1 Textbox2 Textbox3 Command1 Command2 Set The Properties: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Command5 Private Sub Cmdadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmdadd.Click TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text) End Sub Command3 Command4
Property Caption: First No. Caption: Second No. Caption: Result. Text: (empty) Text: (empty) Text: (empty) Caption: Add Name: Cmdadd Caption: SUB Name: Cmdsub Caption: MUL Name: Cmdmul Caption: DIV Name: Cmddiv Caption: EXIT Name: CmdEX
Private Sub Cmdsub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmdsub.Click TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text) End Sub Private Sub Cmdmul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmdmul.Click TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text) End Sub Private Sub Cmddiv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmddiv.Click TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text) End Sub Private Sub Cmdex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmdex.Click End End Sub End Class
Description A string indicating the link to help for this exception Returns the exception object reference to an inner (nested) exception A string that contains a description of the error, suitable for displaying to users A string containing the name of an object that generated the error A read-only property that holds the stack trace as a text string. The stack trace is a list of the pending method calls at the point at which the exception was detected. That is, if MethodA called MethodB, and an exception occurred in MethodB, the stack trace would contain both MethodA and MethodB. A read-only string property that holds the method that threw the exception
TargetSite
The two most important methods of the Exception class are as follows:
Description Returns the first exception in the chain Returns the error string, which might include as much information as the error message, the inner exceptions, and the stack trace, depending on the error
Question 3- Write a simple XML file for student details (sname, sno, sbranch, saddr).
college.xml <college> <student> <student branch=CSE> <sname firstname=h>Rama</sname> <sno>1</sno> <saddr>Hyderabad</saddr>
</student> </college> The root element in the example is <college>. All <student> elements in the document are contained within <college>. The <student> element has 4 children: <sname>, < sno>, <sbranch>, <saddr>.
Question 4- What is meant by DTD? What are the building blocks of DTD?
DTD is one of the specifications included in to XML. DTD has its own small set of constructs and grammar rules that helps us to prepare our markup language specifications. That is the constructs of DTD are understood by the XML parsers that can help our markup language implementation application. DTD file contains the building blocks (i.e. tags) of an XML file. The building blocks of XML document are: 1. Elements (Tags) 2. Attributes 3. Entities 4. PCDATA 5. CDATA
Question 5- Write a program that uses the nodeValue property to change the text node of the first <sname> element in "college.xml.
<html> <head> <script type="text/javascript" src="loadxmldoc.js"> </script> </head> <body> <script type="text/javascript"> xmlDoc=loadXMLDoc("college.xml"); x=xmlDoc.getElementsByTagName("sname")[0]; document. write (xmlDoc.documentElement.nodeName); document. write ("<br />"); document.write(xmlDoc.documentElement.nodeType); </script> </body> </html>