OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   DOM & whitespace Nodes

[ Lists Home | Date Index | Thread Index ]

Hi,

I am parsing an XML document into DOM. I end up with a DOM that contains
everything plus additional text nodes (type 3) containing just "\n". Can I
configure the apache.DOMParser or javax.DocumentBuilder (I am indifferent
to which to use) in such a way that they do not create whitespace nodes?
If not, how can I manage to not get them included -- currently I am
working through the resulting DOM and check all nodes and then remove the
whitespace ones, which seems not the best way of doing it.
My XML file is based on an XML Schema. I also would like to validate it
against the schema, maybe even validate the DOM when changes are made. How
can one do this.
many thanks,
Stephan

--
Dr Stephan Reiff-Marganiec
Research Fellow
Department of Computing Science; University of Stirling
email: srm@cs.stir.ac.uk    tel: 01786 46 7448



-- 
The University of Stirling is a university established in Scotland by
charter at Stirling, FK9 4LA.  Privileged/Confidential Information may
be contained in this message.  If you are not the addressee indicated
in this message (or responsible for delivery of the message to such
person), you may not disclose, copy or deliver this message to anyone
and any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.  In such case, you should destroy this
message and kindly notify the sender by reply email.  Please advise
immediately if you or your employer do not consent to Internet email
for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official
business of the University of Stirling shall be understood as neither
given nor endorsed by it.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS