473,464 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2500
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.