XML

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentXML

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old September 29th, 2017, 06:47 AM
harishpathak harishpathak is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2017
Posts: 0 harishpathak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 22 sec
Reputation Power: 0
Question XML file open in notepad in correct format like xml format

Hi Guys,

We have a requirement to download the internal table data as XML file.

I am generating a XML file (welcome.xml) through PHP. The PHP code is as -
Code:
<?php $xmlString = '<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.codexworld.com</loc> <lastmod>2016-07-04T07:46:18+00:00</lastmod> <changefreq>always</changefreq> <priority>1.00</priority> </url> </urlset>'; $dom = new DOMDocument; $dom->preserveWhiteSpace = FALSE; $dom->loadXML($xmlString); $dom->formatOutput = TRUE; //Save XML as a file $dom->save('test/welcome.xml'); //View XML document echo $dom->saveXml(); ?>


Able to download the XML file in correct format, but when opened in NOTEPAD we are getting the complete tags of the XML in a single line.

We need the notepad file also to look like the format of the XML file when opened.

Please reply as soon as possible.

Thanks in advance.

Harish Pathak

Reply With Quote
  #2  
Old October 5th, 2017, 07:07 AM
harishpathak harishpathak is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2017
Posts: 0 harishpathak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 22 sec
Reputation Power: 0
Question Please reply

Hello Guys,

Please reply of my this question please.

Thanks in advance

Harish Pathak

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentXML > XML file open in notepad in correct format like xml format


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap