472,958 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

XML parser for javascript

Hi Friends,

I have to perform a lot of editing of xml data on the
client-side(browser), using javascript. (before i display the data on
the browser).

Which xml parser is better for accessing and editing xml
elements/attributes through javascript code.

Greetings,
Jagdishwar.

May 10 '06 #1
7 2480
ja*******@gmail.com wrote:
Hi Friends,

I have to perform a lot of editing of xml data on the
client-side(browser), using javascript. (before i display the data on
the browser).

Which xml parser is better for accessing and editing xml
elements/attributes through javascript code.

Where does your XML come from? Why can't you use the parser built int
to the UA?

--
Ian Collins.
May 10 '06 #2
the XML data is present in a global variable (javascript global
variable).
Actually the xml is coming from a file, and i am storing into the
global variable.
the elements in that xml are not sorted.

Now, i have to sort the elements according to a specific criteria. and
then i have to display on the html in a table format.

basically i need a way to extract the individual elements and
attributes present in the xml data. then i can display on the html
page.

May 10 '06 #3
http://xmljs.sourceforge.net/

XML for <SCRIPT> is a powerful, standards-compliant JavaScript XML
parser that is designed to help web application designers implement
cross platform applications that take advantage of client-side
manipulation of XML data.

May 10 '06 #4

vifito wrote:
http://xmljs.sourceforge.net/

XML for <SCRIPT> is a powerful, standards-compliant JavaScript XML
parser that is designed to help web application designers implement
cross platform applications that take advantage of client-side
manipulation of XML data.
I downloaded the "xml for <script>" from the above url.From the documentation, i see there are 3 parsers included in it.


1.W3C DOM
2.Classic DOM
3.SAX

do i need to include all the three js files for parsing the xml data.

Or, are these 3 are independent of each other, i mean can i use only
one any of these three. if this is the case, which one would be better
one.

--
Jagdishwar

May 10 '06 #5
ja*******@gmail.com wrote:
vifito wrote:
http://xmljs.sourceforge.net/

XML for <SCRIPT> is a powerful, standards-compliant JavaScript XML
parser that is designed to help web application designers implement
cross platform applications that take advantage of client-side
manipulation of XML data.

I downloaded the "xml for <script>" from the above url.
From the documentation, i see there are 3 parsers included in it.


1.W3C DOM
2.Classic DOM
3.SAX

do i need to include all the three js files for parsing the xml data.

Or, are these 3 are independent of each other, i mean can i use only
one any of these three. if this is the case, which one would be better
one.

If the names accurately describe the components that all depends what
you have to do with the data.

DOM parsers will build a compete DOM of the document in memory, a SAX
parser will extract specific tags from the document for immediate
processing.

--
Ian Collins.
May 10 '06 #6
ja*******@gmail.com wrote:
I have to perform a lot of editing of xml data on the
client-side(browser), using javascript. (before i display the data on
the browser).

Which xml parser is better for accessing and editing xml
elements/attributes through javascript code.


Browsers will experience memory problems when it's a lot of parsing
like in your case. You will also come on sensitive browser
compatibility grounds.

I'm surprised nobody mentionned XSL here, which is the exact language
for this kind of XML sorting/filtering.

If you're only working with small/easy data, I'ld say your plan could
be okay. But, really, for bullet-proof production you are better of to
use something like CGI, PHP, Java and the like.

Hope this helps,

--
Bart

May 10 '06 #7
Bart, you are absolutely correct.
i could have gone for Java,

but the situation here for me is, i can perform at client-side only.
Our server just gives a messy xml, that i have to sort/organise and
display.

I will check whether i can use xslt on the client side.

--
Jagdishwar

May 10 '06 #8

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

Similar topics

4
by: annoyingmouse2002 | last post by:
Hi there, sorry if this a long post but I'm really just starting out. I've been using MSXML to parse an OWL but would like to use a different solution. Basically it reads the OWL (Based on XML)...
1
by: Mike | last post by:
Hello, I have a string that will contain a table like this: <tr><td>column1data</td><td>column2data</td></tr> I want to use javascript to extract the data for a given row and column. I'm...
8
by: Phat G5 (G3) | last post by:
Has anyone seen a great tutorial on how to use the dom to properly parse an xml document? I was hoping to find something in depth that might show maybe via a pictorial how child nodes and node data...
2
by: David Virgil Hobbs | last post by:
Loading text strings containing HTML code into an HTML parser in a Javascript/Jscript I would like to know, how one would go about loading a text string containing HTML code, so as to be able to...
7
by: macabstract | last post by:
does anyone know of a "reasonably practical" yacc-type parser for JavaScript? in the absence of one, i will endevour to write my own starting from the BNF specification: ...
9
by: Peter Michaux | last post by:
Hi, Does a parser generator exist that generates JavaScript code? Most parser generators generate C or Java code. Thanks, Peter
4
by: fbrewster | last post by:
I'm writing an HTML parser and would like to use Internet Explorers DOM parser. Can I use Internet Explorers DOM parser through a web service? thanks for the help
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.