-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwritexmlacedamic.php
55 lines (37 loc) · 1.48 KB
/
writexmlacedamic.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
$xml= new DomDocument("1.0","UTF-8");
$xml->formatOutput=true;
$xml->preserveWhiteSpace=false;
$acedamicregister=$xml->createElement("acedamicregister");
$acedamicregister=$xml->createElement("acedamicregister");
$xml->appendChild($acedamicregister);
$acedamic=$xml->createElement("acedamic");
$acedamicregister->appendChild($acedamic);
$sssn=$xml->createElement("ssn",123);
$acedamic->appendChild($sssn);
$sfname=$xml->createElement("fname","Amal");
$acedamic->appendChild($sfname);
$slname=$xml->createElement("lname","chandula");
$acedamic->appendChild($slname);
$bday=$xml->createElement("bday","05/25/1996");
$acedamic->appendChild($bday);
$saddress=$xml->createElement("address","Hakmana");
$acedamic->appendChild($saddress);
$semail=$xml->createElement("email","[email protected]");
$acedamic->appendChild($semail);
$gender=$xml->createElement("gender","Male");
$acedamic->appendChild($gender);
$age=$xml->createElement("age",23);
$acedamic->appendChild($age);
$salary=$xml->createElement("salary",50);
$acedamic->appendChild($salary);
$position=$xml->createElement("position","Developer");
$acedamic->appendChild($semail);
$department=$xml->createElement("department",917);
$acedamic->appendChild($department);
$qualification=$xml->createElement("qualification","[email protected]");
$acedamic->appendChild($qualification);
$subjects=$xml->createElement("subjects","JAVA");
$acedamic->appendChild($subjects);
echo "<xmp>".$xml->saveXML()."</xmp>";
$xml->save("acedamicregister.xml");