473,544 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

save XML without XML Prolog

Dormilich
8,658 Recognized Expert Moderator Expert
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::sa ve() automatically inserts the xml prolog)?

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

thanks
Dec 27 '08 #1
4 2599
Atli
5,058 Recognized Expert Expert
The file_put_conten ts function perhaps?

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

Try using DOMDocument::sa veXML() instead, and run a substr() on it if necessary.
Dec 27 '08 #3
Dormilich
8,658 Recognized Expert Moderator Expert
file_put_conten ts() 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 Recognized Expert Moderator Expert
tried file_put_conten ts(). 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
47670
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 attempt to run a simple web service example (http://ws.apache.org/axis/ click on publishing web service for the Calculator example) I get the...
0
2691
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 closed or null etc. Can anyone help? I am using SICStus prolog. Currently my prolog server looks like: :- write('starting'),nl. :-...
0
1400
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 and I am unable to use it (see my post to SWI Prolog mailing list dated Oct. 29th). Does anyone knows a currently working solution ??
4
9433
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 valid but it returns no errors. The WDG validater returns the following. I don't understand what this means. * Line 116, character 8:
1
3432
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 lot. A code snippest would be very helpful. Regards,
41
3376
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
1558
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 any good... I just unpacked and tried out InstantRails, after turning off the local Plone stack. Looking over the IR stack, making the...
39
2389
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 some of the technical aspects. The site looks OK, but under the hood it is an abomination; it was designed by a marketing company seemed to thing they...
7
2597
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
7417
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7361
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7763
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7701
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5901
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4908
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1834
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
983
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
654
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.