473,326 Members | 2,182 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,326 software developers and data experts.

Java NonValidatingDomParser Problem

I can parse files with no problem. The issue comes in when I am
actually going through the document to populate my objects. Any blank
lines are coming in as "#text" items. I can easily enough force the
items to "instanceof element", but I figured there has to be someway
to let java handle this.

For instance the following XML show up with 2 lines with a value of
#text.

<ShipToSection>
<ShipToName>Test user</ShipToName>
<ShipToAddress1>New Test Line 1</ShipToAddress1>
<ShipToAddress2>Address Line 2</ShipToAddress2>
<ShipToCity>Oak Park</ShipToCity>
<ShipToState>IL</ShipToState>
<ShipToPostalCode>60302</ShipToPostalCode>
<ShipToCountry>US</ShipToCountry>
<ShipToPhoneNum>555-555-5555</ShipToPhoneNum>
</ShipToSection>

In testing it, I find if I do use a DOM it controls those values,
however I am not in a position choose to create a DOM. We are
receiving this from another vender which is not providing a DOM.

As I said before I can check the values to be "instanceof element",
but I figured thats going to provide a bit of unwanted overhead for
every line. I figure the parser can do this, I just don't know how.
I basically want all opening and closing tags, and any text elements
that may fall between the open and close. I have tried playing with
the ignorablewhitespace() method...but that doesn't seem to do what I
need.

Thanks for any help you can provide
Jul 20 '05 #1
0 1243

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

Similar topics

6
by: Steven Green | last post by:
I have a java app at work I used when I had Windows 98 and never had a problem. I did a clean install of Windows XP and of course Java was not included. I went to Sun, download Java 2 Runtime...
2
by: Patrick | last post by:
I'm using Jakarta-POI to create a huge Excel spreadsheet. I get the error below when the spreadsheet grows to a large size. It seems to have something to do with the number of "cell" objects that I...
0
by: derek b | last post by:
I can parse files with no problem. The issue comes in when I am actually going through the document to populate my objects. Any blank lines are coming in as "#text" items. I can easily enough...
133
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
2
by: Tim Murray | last post by:
First of all, I don't know much about Java, even its naming and version numbering nomenclature, and second, if there is a better group to ask this in, please let me know. System is Mac with...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
6
by: Rhino | last post by:
I'm trying to debug a simple Java UDF written in the DB2General style within Eclipse. I'm getting a java.lang.UnsatisfiedLinkError when I execute the set() method in the UDF. I know that the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.