Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28583
| From | markspace <markspace@nospam.nospam> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Eloquence Denied?: getElementsByTagName |
| Date | 2014-05-28 09:07 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <lm51kq$jnb$1@dont-email.me> (permalink) |
| References | <de4b166f-4b14-4b56-9244-0d4745a64fc4@googlegroups.com> |
On 5/28/2014 6:04 AM, clusardi2k@aol.com wrote: > Is there an alternative way to write the below program without > hardcoding "person", "first", "last", and "age" or putting these into > a file and reading the contents of a file. I don't think I understand the question. What does "hard coding" refer to here? If by "hard code" you mean the fields themselves then an ArrayList or Stack can help you out. I've done that with XML, it works fine. OTOH, at some point, if you want values to appear in a program, you have to code them in. Data entry is a thing. Sometimes you can outsource this to someone else, but in my experience outsourced data entry makes a lot of errors and pretty much typifies "lowest cost solution." Sometimes you can generate data procedurally. Ie calculate the vales. Works best for making test data imo. Sometimes you can buy a database or find a similar project and use their database. There's a fair amount of free stuff available online. Leif raises a good point that you have to interpret the data at some point. If you XML has a schema however you should be able to write (or download, because it's a generic thing) a parser that reads both the XML and the schema and then interprets the data in a generic but more meaningful way.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Eloquence Denied?: getElementsByTagName clusardi2k@aol.com - 2014-05-28 06:04 -0700 Re: Eloquence Denied?: getElementsByTagName Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-05-28 09:50 -0400 Re: Eloquence Denied?: getElementsByTagName leif.roar@invalid.com (Leif Roar Moldskred) - 2014-05-28 09:24 -0500 Re: Eloquence Denied?: getElementsByTagName markspace <markspace@nospam.nospam> - 2014-05-28 09:07 -0700 Re: Eloquence Denied?: getElementsByTagName Joerg Meier <joergmmeier@arcor.de> - 2014-05-29 01:05 +0200 Re: Eloquence Denied?: getElementsByTagName markspace <markspace@nospam.nospam> - 2014-05-28 16:18 -0700
csiph-web