× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I had a requirement to convert a 25,000 customer detail element xml into
an iSeries PF. Each element had around 2.5 Kb data and a total of nearly
60 Mb. The xml structure is flat, ie customer detail element has no sub
elements, just attributes :
<custdata atr1="val1" atr2="val2" .........atrN="valN"  />. Each customer
element converts to a PF record and each attribute to a PF column.

My preferred choice would be to use JDOM as it's straightforward to code
and great for random access to the DOM tree. However  the whole DOM tree
is loaded into memory and given the volume of data this will raise
performance issues. Instead, I chose the SAX  APIs from the Xerces parser.
Since, SAX  uses event driven processes which are ideal for a straight
through read of the xml document and will not load the whole document into
memory so avoiding the performance issues.

With SAX the whole parse/load process took about 2.5 minutes on an 830
machine which was good. I would liked to have run a JDOM load for a
comparison but didn't have time although I suspect that it would take much
longer.

Just 1 question. Is there any restriction or scoping as to what can be
called from the ContentHandler methods against ordinary methods? I
instantiated the Date class in the startDocument method to a member level
variable and then did t oString() to print the start time:
        d = new Date();
        System.out.println(d.toString());
This printed OK but when I did  System.out.println(d.toString());  to
print the end time in the endDocument method I got a null exception on
reference d. I expected this to work since d was a member variable. Does
anyone the cause of this and a workaround other than a second Date
instantiation.

Thanks,

Keith








As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.