Ignoring spaces, tabs and line in XML DOM parsing

Discussion in 'Java' started by Sandeep, Jan 13, 2006.

  1. Sandeep

    Sandeep Guest

    I am parsing an XML file using xerces DOM parser. The problem is, the
    DOM gets created with spaces, newlines and tabs as a TEXT section.

    Hence if XML is,

    first child of "Address" is "Name"

    if XML is

    first child of "Address" is "\n".

    Is there a way i can configure the parser to ignore all white
    spaces,tabs and newline characters ?

    Sandeep, Jan 13, 2006
    1. Advertisements

  2. Yes, there is a way but the exact method escapes me at the moment.
    Start digging in the parser API, perhaps look at the properties
    recognized by your parser.

    Raymond DeCampo, Jan 15, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.