473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

save XML without XML Prolog

Dormilich
8,658 Expert Mod 8TB
Hi,

I'm trying to save a xhtml snippet to file. Is there a way besides fwrite() to save an xml string without the xml prolog (e.g. DOMDocument::save() automatically inserts the xml prolog)?

note: the string to save doesn't contain the prolog.

thanks
Dec 27 '08 #1
4 2582
Atli
5,058 Expert 4TB
The file_put_contents function perhaps?

Or am I not getting the problem?
Dec 27 '08 #2
pbmods
5,821 Expert 4TB
Heya, Dormi.

Try using DOMDocument::saveXML() instead, and run a substr() on it if necessary.
Dec 27 '08 #3
Dormilich
8,658 Expert Mod 8TB
file_put_contents() looks good. I'll try that.

@pbmods: I already have the string, I only need saving.

thanks Atli
Dec 27 '08 #4
Dormilich
8,658 Expert Mod 8TB
tried file_put_contents(). it works really well (much less coding than fwrite()).

thanks for the quick help, anyway.
Dec 27 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Greg Scharlemann | last post by:
I have set up Apache Axis with a Resin server. Everything seems to be set up correctly, axis will validate if I display the http://axis.scharlemann.com/axis/happyaxis.jsp file. However when I...
0
by: Dominique | last post by:
I am trying to communicate to a prolog server from a java client, however even though the connection is successfully made every time I try to perform QueryExecute I get an error, either Socket...
0
by: Andrzej Walczak | last post by:
Dear all, I am looking for an interface to call SWI-Prolog from python which is my prototyping language. So far the best API looks to have pyprolog 0.2.0 from Nathan Denny. Code is a bit dated...
4
by: ØvêrÇloçkër | last post by:
Hi, I have been trying to validate an xhtml 1.0 transitional page with the W3C Markup Validater. After making all corrections and validating the css, the validater still says the page is not...
1
by: Ahmad Jalil Qarshi | last post by:
Hi! I want to use Prolog code in my VB or C# application. but dont know how to make it possible to communicate with Prolog code from VB or C#. if some one know about that, it will help me a...
41
by: Mountain Bikn' Guy | last post by:
What is the current preferred way to save user preferences in dotnet? Is the registry the right place to do this? Can anyone recommend a good article (or book) for this topic? Thanks.
13
by: RK | last post by:
I apologize if this is a stupid question, I'm asking Python group for perspective on Ruby, but I don't see how the alternative of going to a ruby group for a perspective on Ruby is going to do me...
39
by: CJM | last post by:
I'm in the process of partially revamping a corporate website. My main brief was to reorganise much of the content and to update a lot of the copy, but in the process I'm also trying to correct...
7
by: Daniel | last post by:
what encoding does system.xml.xmldocument.save(string path) use to save the xml document if there is no <?xml... in the front of the xml document?
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.