You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Harikrishna_B <Ha...@satyam.com> on 2002/03/13 14:35:01 UTC

How To remove WhiteSpace

Hello All,
    I constructed a Dom from an xml file.
    I had counted the number of children for the rootnode.
    I am getting #text elements are also the children of root node.
    How to remove this #text?
    This empty element is coming between one element and the other element.


Thanks in Advance,
B.HARIKRISHNA


************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

RE: How To remove WhiteSpace

Posted by Ragunath Marudhachalam <rm...@circuitvision.com>.
How To remove WhiteSpaceHi,

Read the document nodelist and from the nodelist check the node as whether
it is of type ELEMENT_NODE like this... Hope this helps..

              Node n = nl.item(i);
              if (n.getNodeType()==Node.ELEMENT_NODE)

Ragu
CircuitVision

  -----Original Message-----
  From: Harikrishna_B [mailto:Harikrishna_B@satyam.com]
  Sent: Wednesday, March 13, 2002 8:35 AM
  To: xerces-j-user@xml.apache.org
  Subject: How To remove WhiteSpace


  Hello All,
      I constructed a Dom from an xml file.
      I had counted the number of children for the rootnode.
      I am getting #text elements are also the children of root node.
      How to remove this #text?
      This empty element is coming between one element and the other
element.



  Thanks in Advance,
  B.HARIKRISHNA



  **************************************************************************
  This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.

  **************************************************************************