473,499 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

removing ignorable whitespace from minidom.DOM

apologies for asking this. it must have been answered before. i have
really tried to find the answer elsewhere.

a simple question: i'd like to remove all ignorable whitespace from
my minidom representation. it make the DOM much cleaner (for me).

i've resorted to parsing first with Sax2 and using StripXml to deal
with the whitespace. why not stick with the Sax2 DOM you ask? legacy
code all uses the minidom, and they're not *quite* compatible.

unfortunately, the Sax2 parser moves all of my (very intentional)
namespace declarations to the document level, which causes me yet
another headache). if anyone here happens to know how to *stop* the
Sax2 reader from mucking up my namespaces, that would be nice to know
too. of course, i'm sure the mucking is done for another Very
Important Reason. it's still mucking to me.

in a better world, i'd vow my lifelong service to anyone who can help
with these questions. in ours, i'll say: thanks in advance ; )

haughki
Jul 18 '05 #1
0 1966

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

Similar topics

0
7477
by: xtian | last post by:
Hi - I'm doing some data conversion with minidom (turning a csv file into a specific xml format), and I've hit a couple of small problems. 1: The output format has a header with some xml that...
5
6348
by: Mike McGavin | last post by:
Hi everyone. I've been trying for several hours now to get minidom to parse namespaces properly from my stream of XML, so that I can use DOM methods such as getElementsByTagNameNS(). For some...
0
1389
by: Manuel Collado | last post by:
Perhaps I've missed something obvious, but after reading the docs and doing some Google search I can't find how to detect ignorable whitespace with the Expat parser. Could somebody enlighten me?...
4
6035
by: webdev | last post by:
lo all, some of the questions i'll ask below have most certainly been discussed already, i just hope someone's kind enough to answer them again to help me out.. so i started a python 2.3...
2
2008
by: Carlitos | last post by:
Hi there, A class in Xerces J-API (Java) called TextImpl contains a property that returns whether the text is ignorable whitespace...
2
1926
by: Carlitos | last post by:
Hi there, A class in Xerces J-API (Java) called TextImpl contains a property that returns whether the text is ignorable whitespace...
0
1428
by: nikhilhs1110 | last post by:
Is there a way to get PyXML and dom/minidom to ignore whitespace? Or a simple way to strip it away? Thanks. -Nick
0
1503
by: Gary | last post by:
Howdy I ran into a difference between Python on Windows XP and Linux Fedora 6. Writing a dom to xml with minidom works on Linux. It gives an error on XP if there is an empty namespace. The...
2
7319
by: beatTheDevil | last post by:
Hey guys, As the title says I'm trying to make a regular expression (regex/regexp) for use in removing the comments from code. In this case, this particular regex is meant to match /* ... */...
0
7169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7215
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...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5467
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,...
0
4597
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...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
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 ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
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...

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.