473,218 Members | 1,397 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,218 software developers and data experts.

preserveWhiteSpace and imported nodes dosn't work...

R
Hello everybody.

I've got problem with preserving whitespaces:

$doc->preserveWhiteSpace = false;

works fine up to the point when I try to load external XML file.

// up to this point whitespaces are OK
// load new DomDocument
$tmpXml = DomDocument::load($pFileName);
// new DomDocument change its whitespaces
$tmpXml->preserveWhiteSpace = false;
$tmpNode = $tmpXml->documentElement;
$contents->appendChild($doc->importNode($tmpNode, true)));

has any one experienced this issue?

firstChild, previousSibling are DOMText so I have to use
getElementsByTagName() which is much slower...
especially when I know that the node I'm interested in
is firstChild (XSD schema)

when I saveXML I can see that nodes that were imported have
whitespaces and the rest of my saved document is space-free

thanks in advance for Your help
best regards
R
Jul 17 '05 #1
0 1232

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Rolf Kemper | last post by:
Dear Experts, I got stuck with the following problem and need your help. What I wnat to do is to get a set of distinct nodes. Before the distinct I have selected the multiple occourences...
2
by: Henri Sivonen | last post by:
I try to associate DOM nodes with other objects. Assigning custom properties to DOM nodes works in Firefox and Safari. It also works with HTML nodes in IE6. However, it appears not to work with XML...
1
by: Riko Eksteen | last post by:
Hi I'm reading an xml file into an XmlDocument, adding some nodes, and writing it back out. I would like the nodes I add to assume the same level of indeting as the rest of the document. (I load...
0
by: ryang | last post by:
Hi, PreserveWhitesapce property doesn't seem to work for me in various ways. Here are samples that I tried. First the XmlDocument is loaded with PreserveWhitespace = true. XmlDocument xmlDoc...
0
by: Shaun Dore | last post by:
Hi, What is the Xml DOM PreserveWhitespace property supposed to do? I thought that setting it to false would remove the superfluous white spaces? For instance, in the following code I would...
4
by: Reza | last post by:
checkedListBox1.ClearSelected(),dosn't clear my selections in my checkedboxlist. How can I clear an specific item based on its value ,name or anything else? thanks for your response.
3
by: juvi | last post by:
Hi, I have got a problem with Treeview.Nodes.Clear() under VB2005. When I have some nodes in my treeview and a force to clear() all nodes then it seems to work, because the nodes are not visible....
2
by: Fergus Mcgee | last post by:
I'm using C# and .NET 2 I am creating an XmlDocument object and setting PreserveWhiteSpace to True, I use loadXMl to load XML from a file but when I look at the XML of the document object some of...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I just noticed something that seems counter-intuitive to me. By default an XmlDocument is set with PreserveWhitespace=false. This means that XmlDocument.Load() or .LoadXml() will...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

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.