- 1

java program to read text_file(contains XML code but not formatted with tab) and output file generate with specifieng Tab

generate output file is text file.

13th Oct 2017, 9:55 AM
Pandurang vadane
3 ответов
0
What is the answer of this question
9th May 2019, 7:25 AM
aditi yogi
- 2
(note that--> without using any parser )Write a program to print INPUT XML on screen formatted as given in OUTPUT XML such that each level is indented by one tab e.g. first level is 1 tab, second level is 2 tabs indented and so on. //input.txt <?xml version="1.0" encoding="UTF-8"?> <company> <name> Tech PVT. Ltd.</name> <employees> <employee id="1"> <name>ABC PQR</name> <address> <line1>M G Road</line1> <line2>nashik</line2> <state>Maharashtra</state> <city>Pune</city> </address> <phones> <mobile>9876543210</mobile> <landline>0209876543</landline> </phones> <education> <degree> <college> <name>College of engineering</name> <address> <line1>M G Road</line1> <line2>nagar</line2> <state>Maharashtra</state> <city>Pune</city> </address> </college> </degree> </education> </employee> </employees> </company> //Expected output <?xml version="1.0" encoding="UTF-8"?> <company> <name>Raykor Technologies PVT ltd</name> <employees> <employee id="1"> <name>ABC PQR</name> <address> <line1> M G Road </line1> <line2> Baner </line2> <state> Maharashtra </state> <city> Pune </city> </address> <phones> <mobile> 9876543210 </mobile> <landline> 0209876543 </landline> </phones> <education> <degree> <college> <name>College of engineering< name> <address> <line1> M G Road </line1> <line2> Baner </line2> <state> Maharashtra </state> <city> Pune </city> </address> </college> </degree> </education> </employee> </employees> </company>
19th Oct 2017, 6:05 AM
Pandurang vadane
- 7
17th Feb 2020, 4:54 PM
Pooja Vaidkar
Pooja Vaidkar - avatar