473,413 Members | 1,989 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,413 software developers and data experts.

Accessing an XML data file

I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.

The best approach that I can see to handle this is to use
DHTML/Javascript since this needs to be a browser-independent
application.

The trouble I am running into is on how to accomplish this. Is this
the best approach to handle this situation? If so how would I go about
doing this in Javascript/DHTML?

Thx
-t
Jul 23 '05 #1
11 2153
On 11 May 2004 11:33:45 -0700, to*****@hotmail.com (Todd) wrote:
I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.


Why? That seems a pretty ridiculous constraint, why have you assumed
XML is the solution?

XML is almost certainly not the solution (it very rarely is, unless
you've not got a clue what's at the other end and need to send
arbitrary complicated infosets)

The appropriate solution here would almost certainly be JSON -
www.json.org

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #2
to*****@hotmail.com (Todd) writes:
an XML Data Island. since this needs to be a browser-independent application.
I don't think XML Data Islands are browser independent. Event the
terminology is a Microsoft invention. The rest of us just calles i
"malformed HTML" :)
The trouble I am running into is on how to accomplish this. Is this
the best approach to handle this situation? If so how would I go about
doing this in Javascript/DHTML?


What is the *real* problem you need to solve?
If you tellus, we migth be able to say which approach would be better.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #3

"Todd" <to*****@hotmail.com> schrieb im Newsbeitrag
news:a4**************************@posting.google.c om...
I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.

The best approach that I can see to handle this is to use
DHTML/Javascript since this needs to be a browser-independent
application.

The trouble I am running into is on how to accomplish this. Is this
the best approach to handle this situation? If so how would I go about doing this in Javascript/DHTML?

Thx
-t


Maybe this helps you?
http://gazingus.org/html/XML_Parser_in_JavaScript.html

The main problem is to load the xml data file into a Var. I've had
some code but it's not really satisfying. Gives popup warnings under
Gecko engine and doesn't seem to work on Netscape6. Unfortunately I
can't find it anymore.

HTH,
Gernot


Jul 23 '05 #4
Jim Ley wrote:
On 11 May 2004 11:33:45 -0700, to*****@hotmail.com (Todd) wrote:
I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.


Why? That seems a pretty ridiculous constraint, why have you assumed
XML is the solution?

XML is almost certainly not the solution (it very rarely is, unless
you've not got a clue what's at the other end and need to send
arbitrary complicated infosets)

The appropriate solution here would almost certainly be JSON -
www.json.org

Jim.


Nonsense.

XML is standard, but the OP should not use the data islands. DOM is a much
better and universal solution -- there is some differences in implementation
between browsers but nothing that Sarissa
(https://sourceforge.net/projects/sarissa/) and WebFX XML Extras
(http://webfx.eae.net/dhtml/xmlextras/xmlextras.html) couldn't solve.

Berislav

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.
Jul 23 '05 #5
What I have been tasked to do is this....
I have been given an XML file and it's DTD and I need to write a
client-side(Javascript) application that accesses these xml file.

What I need for this app to do is search on 1 field in this XML doc,
return certain fields from that file with one field being hyperlinked
to the details.

I hope that this makes sense and I really appreciate the help.
-t
"Gernot Frisch" <Me@Privacy.net> wrote in message news:<2g************@uni-berlin.de>...
"Todd" <to*****@hotmail.com> schrieb im Newsbeitrag
news:a4**************************@posting.google.c om...
I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.

The best approach that I can see to handle this is to use
DHTML/Javascript since this needs to be a browser-independent
application.

The trouble I am running into is on how to accomplish this. Is this
the best approach to handle this situation? If so how would I go

about
doing this in Javascript/DHTML?

Thx
-t


Maybe this helps you?
http://gazingus.org/html/XML_Parser_in_JavaScript.html

The main problem is to load the xml data file into a Var. I've had
some code but it's not really satisfying. Gives popup warnings under
Gecko engine and doesn't seem to work on Netscape6. Unfortunately I
can't find it anymore.

HTH,
Gernot

Jul 23 '05 #6
Todd wrote:
I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.

The best approach that I can see to handle this is to use
DHTML/Javascript since this needs to be a browser-independent
application.

The trouble I am running into is on how to accomplish this. Is this
the best approach to handle this situation? If so how would I go about
doing this in Javascript/DHTML?

Thx
-t


Natively Javascript has no ability to deal with external files. It did
at one point but people were cute and used the ability to get the
contents of child frames to snoop on surfers and even phish their credit
card numbers.

You can do it through an activeX component though, there's a nice
overview and explination here (complete with cross-browser examples)...

http://javascriptkit.com/dhtmltutors/getxml.shtml

Hope this helps.

--
-------------
http://www.hunlock.com -- DHTML for the rest of us.
Jul 23 '05 #7
I have been given an XML file and it's DTD and I need to write a
client-side(Javascript) application that accesses these xml file.

What I need for this app to do is search on 1 field in this XML doc,
return certain fields from that file with one field being hyperlinked to the details.
That's what I thought of in the first place. As I pointed out: The
link I provided has a XML reader class that does exaclty what you want
it to do. Only problem is: You have to provide the content of the xml
file in a Var string. And here the fun beginns. I haven't found any
x-browser solution to read ascii data from a file without being bugged
by any message at least. IE behaves smoothly as it would when you try
to format your HDD with JS I think. Mozilla Firebird gave a question
about "Do you want to give file read access to ...". Opera (by default
installation) worked quiet, too and Netscape6 didn't work at all.
You need the xml class I pointed to and a ReadFileToVar() function
which I cannot provide (I've dumped the source coincidentally).

I hope that this makes sense and I really appreciate the help.


Sure, XML is a great file format for exchanging data between
applications. Easy to debug, easy to read, wide acceptance.
-Gernot
Jul 23 '05 #8
Lee
Berislav Lopac said:

Jim Ley wrote:
On 11 May 2004 11:33:45 -0700, to*****@hotmail.com (Todd) wrote:
I have been tasked to create an app that will be run from a CD on
stand-alone machines that needs to search and retrieve data from an
XML Data Island.


Why? That seems a pretty ridiculous constraint, why have you assumed
XML is the solution?

XML is almost certainly not the solution (it very rarely is, unless
you've not got a clue what's at the other end and need to send
arbitrary complicated infosets)

The appropriate solution here would almost certainly be JSON -
www.json.org

Jim.


Nonsense.

XML is standard, but the OP should not use the data islands.


XML is a standard way to represent data when you don't know
anything about the system that will be accessing that data.
It is not "the" standard way to represent data.

Jul 23 '05 #9
Todd wrote:
The best approach that I can see to handle this is to use
DHTML/Javascript since this needs to be a browser-independent
application.
Browser independentness will definitely be limited, since not all
browsers support XML processing anyway...
The trouble I am running into is on how to accomplish this. Is this
the best approach to handle this situation? If so how would I go about
doing this in Javascript/DHTML?

I'm writing an application for IE and Mozilla and there are two ways in
which I read XML: by making an asynchronous call to the server using
Sarissa (http://sarissa.sourceforge.net) that issues an XMLHTTPRequest,
very nice and clean but only useful when you want to use asynchronous
loading since using XMLHTTPRequest for synchronous loading can
completely freeze Mozilla based browsers, and by using XML data islands,
pretty useful although ugly and not valid XHTML.
Both work just fine, as long as IE and Mozilla based browsers are the
only ones you care about. I think the first one is a bit nicer looking
but the second one is a bit easier to use I guess. If you want to see
some examples, for the first one see the Sarissa Sourceforge page (quite
useful), for the second one search Google, you will find plenty. Or you
can of course check out the application I work on (http://kupu.oscom.org).

Good luck,

Guido Wesdorp
Jul 23 '05 #10
Todd wrote:
What I have been tasked to do is this....
I have been given an XML file and it's DTD and I need to write a
client-side(Javascript) application that accesses these xml file.

What I need for this app to do is search on 1 field in this XML doc,
return certain fields from that file with one field being hyperlinked
to the details.

I hope that this makes sense and I really appreciate the help.
The other detail that you mentioned in your first post was that the
result of this effort was to be available on a CD. CDs have two
characteristics that seem relevant to the problem as stated: they have a
considerable storage capacity and whatever goes onto one is fixed at the
point the CD is burnt/manufactured.

This makes me wonder whether you need to use client-side scripting to
attempt to read an XML file at all. As the XML data must be fixed at the
point of creating the CD there must also be a finite number of search
permutations and results. My thoughts go to pre-processing, taking you
XML data and creating pre-processing scripts that will generate
ordinarily interlinked HTML files for all the search possibilities, in a
form/structure that makes it possible for a user to extract the
specifics as if they were searching the data, but in reality they are
just following links to pre-formed HTML pages.

The result would likely be an enormous number of HTML files, but you do
have an entire CD to store them on.

And since the point of getting the data in XML form is probably to allow
later revisions to use updated XML files you would want to hang on to
the pre-processor scripts so that you could build the corresponding
contents for the next CD version form the new XML file as easily as
building the first (easier as it would no longer be necessary to create
the pre-processor).

(while you were working on the pre-processors it would probably be a
good idea to arrange for it to output some sort of test script in
addition to the HTML data so that the integrity of the result could be
verified following the creation of the CD, it would not be easy to do
that by hand).
"Gernot Frisch" <Me@Privacy.net> wrote in message

<snip>

Please do not top-post to comp.lang.javascirpt. Apart form the extra
work it creates for experienced Usenet users and the fact that it
demonstrates a failure to read the group's FAQ (a pre-requisite on
technical groups) or a disregard of it's contents (unwise), top-posting
will also give a number of the people who could offer valuable
assistance the impression that you are not worth their gong out of their
way to help. And you are the only person who will suffer for that.

Richard.
Jul 23 '05 #11
On Wed, 12 May 2004 22:55:50 +0200, Guido Wesdorp
<gu***@debris.demon.nl> wrote:
I'm writing an application for IE and Mozilla and there are two ways in
which I read XML: by making an asynchronous call to the server using
Sarissa (http://sarissa.sourceforge.net) that issues an XMLHTTPRequest,
Safari also supports this I believe.
very nice and clean but only useful when you want to use asynchronous
loading since using XMLHTTPRequest for synchronous loading can
completely freeze Mozilla based browsers, and by using XML data islands,
pretty useful although ugly and not valid XHTML.


It can kill IE too. XML data islands could be valid in XHTML -
(that's the whole point of XHTML 1.1 modularisation) but not in XHTML
1.0 so you can't serve it to IE anyway. They're pointless.

The solution here though for the CD should not be using XML, it's
really not appropriate, and is unnecessary. Either pre-process direct
to HTML, or preprocess to JSON which any browser can load with <script
src="...">

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #12

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

Similar topics

2
by: George Grodentzik | last post by:
I created a typed dataset from which I am trying to access the data. When I use the following code to access a row string name =dataset.person.firstName I receive an error...
6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
3
by: mark.jerrom | last post by:
I'm fairly new to this Web Service game so please feel free to suggest something different if it looks like i'm completely off track! I'm trying to write an application that runs on a Pocket PC...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
5
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
2
by: le0 | last post by:
guys, this is my first time to deploy website to the server, but every time i access the page this error always appears. ...
3
by: Nathan Sokalski | last post by:
When I attempt to access a Microsoft Access database from my website, I recieve the following error: Server Error in '/' Application....
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.