• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

client's side parsing using IE 5.0

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
guyz,
i hav developed LAN web-app in-which i am using xml+xslt to generate HTMLs. Right now i am using server-side parsing , but i want to parse at client-side to make it efficient. So is there any tool/control which will load at login page and installs MS paser 3.0 or greater w/o requiring client interrupting anything.
Thanks
...Ashish
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not a great fan of client side parsing as it incurs significant performance overheads and client(browser) memory. However, it is possible to use inline java code( jsp ) to instantiate MSXML browser. Your best bet for an example program would be one of the MSXML pages.
 
Ashish Jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ajith for reply,
I think, u didn't get my problem situation here.
I am getting XML data from backend EJBs instead of java beans.
Now i am parsing that XML using XSLT into HTMLs. then i send back HTMLs to frontend.
Now in multi-user environment, i am using lot of system resources/time in parsing at server-side. If client's browser is able to parse xml, then i just need to pump xml to client-side. Ofcourse i get other advantages in sending xml to client-side, like performance, less server round trip, more dynamic options on client-side etc etc.
Now my client is not expected to do any technical work in manual installing ms parser 3.0 kinda stuff!!. So i want to automate this, like when he hits login screen, then jscripts detect that whether he got parser ver 3.0 or not. If he hasn't got parser installed, i want to install parser in his browser auotmatically like we do in plug-ins
Thanks
Ashish
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!!
IE has a built in XML parser( your client doesn't have to do anything special for this) the following is an sample HTML file which works fine for me

<html>
<script language="JavaScript">
var text="<note>"
text=text+"<to>Harish</to><from>Raj</from>"
text=text+"<heading>Reminder</heading>"
text=text+"<body>Don't forget me this weekend!</body>"
text=text+"</note>"
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.loadXML(text)

// ....... processing the document follows
document.write
("The first file was sent to ")
document.write
(xmlDoc.documentElement.childNodes.item(0).text)
document.write
(" by ")
document.write
(xmlDoc.documentElement.childNodes.item(1).text)
</script>
</html>

Anish

Originally posted by Ashish Jain:
Thanks ajith for reply,
I think, u didn't get my problem situation here.
I am getting XML data from backend EJBs instead of java beans.
Now i am parsing that XML using XSLT into HTMLs. then i send back HTMLs to frontend.
Now in multi-user environment, i am using lot of system resources/time in parsing at server-side. If client's browser is able to parse xml, then i just need to pump xml to client-side. Ofcourse i get other advantages in sending xml to client-side, like performance, less server round trip, more dynamic options on client-side etc etc.
Now my client is not expected to do any technical work in manual installing ms parser 3.0 kinda stuff!!. So i want to automate this, like when he hits login screen, then jscripts detect that whether he got parser ver 3.0 or not. If he hasn't got parser installed, i want to install parser in his browser auotmatically like we do in plug-ins
Thanks
Ashish



[This message has been edited by Anish Raj (edited December 05, 2001).]
 
Ashish Jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for reply!!
well, i know that IE comes with xml parser BUT version 2.6, (except IE 6). And my xslt and xmls are written for msxml parver version 3.0 So i need to upgrade parser of client's browser something using script or control, something automatic!!
...Ashish
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashish,
Now in multi-user environment, i am using lot of system resources/time in parsing at server-side.
Isn't that the reason why server-side processing is better? Server is traditionally defined as a machine that has more memory, computing power and other resources using which it can efficiently handle multiple client requests.
If client's browser is able to parse xml, then i just need to pump xml to client-side. Ofcourse i get other advantages in sending xml to client-side, like performance, less server round trip, more dynamic options on client-side etc etc.
How do you ensure a common degree of compliancy between different parsers on the clients? If the client parser is not compatible with some XML feature that is used in the XML cooked by the EJB, that particular client will not be able to make sense out of data. If you let the client do parsing/processing, aren't you making some assumptions such as all the clients understand the XML that you produce?
Can you explain more about "less server round trip?" In a typical server-side processing scenario the server generates the renderable format and gives it to the client. Where are additional round-trips coming from?
Now my client is not expected to do any technical work in manual installing ms parser 3.0 kinda stuff!!. So i want to automate this, like when he hits login screen, then jscripts detect that whether he got parser ver 3.0 or not. If he hasn't got parser installed, i want to install parser in his browser auotmatically like we do in plug-ins
Have you decided at this point of time that your clients will only be using MS parser? ( if the answer is yes, then ignore my second question ). What if you want to extend your user base and some people want to use Netscape? What if you stump on a shortcoming of MS parser seven months down the line? How do you make sure clients don't upgrade their parsers without telling you? What happens if they do, and the new version of the MS parser( say, 4.0 ) has some features that may change the processing/redering?

As you can see, I am raising some valid concerns about client-side processing. I am not a great advocate of client side logic simply because there are too many variables in the equation. Things can go terribly wrong and it can result in a maintenance nightmare.
Think about it.
Cheers!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
Co-author of Java 2 Certification Passport
 
Look! It's Leonardo da Vinci! And he brought a tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic