473,668 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

x-browsercize selectNodes + transformNode



I'm trying to make some Javascript X-browser.

foo is a HTML DOM.

I have foo.documentEle ment.selectNode s("xpath"); in the source.
I see later down there is also a foo.transformNo de. Yuck.

Has someone written a x-browser selectNodes/transformNode implementation
so that I can get this code working in a non IE browser??

Any recommendations (other than flames, unless they too contain a
recommendation) greatly appreciated :-D
Feb 20 '07 #1
3 2405
* John Smith wrote:
>
I'm trying to make some Javascript X-browser.

foo is a HTML DOM.

I have foo.documentEle ment.selectNode s("xpath"); in the source.
I see later down there is also a foo.transformNo de. Yuck.

Has someone written a x-browser selectNodes/transformNode implementation
so that I can get this code working in a non IE browser??

Any recommendations (other than flames, unless they too contain a
recommendation) greatly appreciated :-D
As an afterthought I could quite easily knock up a webservice that
contains the method selectNodes (and returns a DOM) and transformNode
(that returns a DOM) and just change the Javascript so that it calls
these two new web methods, however this seems to me to be a bit of a hack.
Feb 20 '07 #2
John Smith wrote:
>
I'm trying to make some Javascript X-browser.

foo is a HTML DOM.

I have foo.documentEle ment.selectNode s("xpath"); in the source.
I see later down there is also a foo.transformNo de. Yuck.

Has someone written a x-browser selectNodes/transformNode implementation
so that I can get this code working in a non IE browser??
Since then does IE support selectNodes or transformNode on a HTML DOM?
As for other browsers and XPath support, Mozilla and Opera 9 support the
W3C DOM Level 3 XPath
<http://www.w3.org/TR/DOM-Level-3-XPath/>
As for other browsers and scripted XSLT support, for Mozilla and for
Opera 9 see

<http://developer.mozil la.org/en/docs/Using_the_Mozil la_JavaScript_i nterface_to_XSL _Transformation s>

XSLT and XPath in both Mozilla and Opera works on both XML DOM trees and
HTML DOM trees.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Feb 20 '07 #3
* Martin Honnen wrote:
John Smith wrote:
>>
I'm trying to make some Javascript X-browser.

foo is a HTML DOM.

I have foo.documentEle ment.selectNode s("xpath"); in the source.
I see later down there is also a foo.transformNo de. Yuck.

Has someone written a x-browser selectNodes/transformNode implementation
so that I can get this code working in a non IE browser??

Since then does IE support selectNodes or transformNode on a HTML DOM?
erm XML DOM?

My point was I have a load of code that uses selectNodes and
transformNode and (obviously) it doesn't work in other browsers and I
was hoping there might be a simple way of getting something quick and
dirty running. Perhaps using prototyping to add these methods where they
are lacking to any other DOM i'm using, so I don't have to change the
existing code (easier for testing, and also better for me not cocking up
anything that currently works by touching it).

I saw mozxpath.js , but now I've found Sarissa and to be honest it looks
like it might be the way to go but I know nothing about this kind of
stuff so I was looking for helpful comments :-)
Feb 20 '07 #4

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

Similar topics

8
6439
by: e-mid | last post by:
i want to get childs of specific xml node. normally i use xmlNodeList fooList = myNode.SelectNodes("foo"); but in compactframework , there is no selectNodes() method or selectSingleNode() method. what else can i use instead?
1
1733
by: Riko Eksteen | last post by:
Hi I am writing an application that listens to the NodeInserted event, and if the event is fired it does a selectnodes xpath query on the XmlDocument. Only problem is, when I call SelectNodes(string, XmlNameSpaceManager) the NodeInserted event gets fired as well, without me doing any modifucation of the document. This results in an infinite loop of metod calls and callbacks in my app, and eventually a stack overflow in the XmlDocument.
2
1756
by: Michael H | last post by:
Hello group, I have a some xml that looks like this below: <tuneRequests ct="3" xmlns:sql="urn:schemas-microsoft-com:xml-sql" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tr xsi:type="trGenericType" number="2">
2
2183
by: Linda Boumarafi | last post by:
Hi, This is a newbie question to XMLNS. I just finished the article on "XML Namespaces and How They Affect XPath and XSLT" by Dare Obasanjo and I'm pretty sure I understand the problem. I just don't know how to achieve the desired XPath result. I'm dealing with an XML document that has two XMLNS' in the root node (Report) and I'm ending up with 0 results using SelectNodes. If I take out both namespaces, the SelectNodes(XPathQuery) works...
2
2073
by: Joe Kraft | last post by:
We just turned on a new website that runs on an XML/XSL templates that get transformed using various .Net objects. The final call is to the MSXML3 TransformNode function. Though the page loads as expected, when it is running the TransformNode function the CPU on the server (2 2Ghz processors hyperthreaded so the server sees 4...1gig of RAM) gets pegged at 100% utilization for about a second while it's generating the HTML. We've found that a...
2
4394
by: Joe | last post by:
Hello All: Does anyone know the differnce between the GetElementsByTagName method and the SelectNodes method? I know that they take different arguments. They also both return a NodeList. I'm wondering when would I use one vs. the other. TIA, -- Joe
0
1250
by: Johan | last post by:
Hi! I have a problem with my app which is mixed .NET and native code. The problem is of course with the well-known buggy EnableVisualStyles. Now, at first I called: Application.EnableVisualStyles(); Application.DoEvents(); in the main method. My native treeview component then did not show any icons. So, I removed the lines above and instead added a .manifest file and
2
3216
by: DeveloperX | last post by:
SelectNodes under 1.1 is confusing me. Imagine an xml file that looks like this. It's just an example: <drive> <dir a="a"> <file>aA</file> <file>aB</file> <dir a="ab"> <file>abA</file> <dir a=abc>
3
6814
by: Alan Mailer | last post by:
Ok, I've looked for an answer for this, because I'm sure it's been asked a thousand times... but no luck... so here goes. Imagine I want to create a NodeList based on an XPath statement. The 'query' portion of that statement wants to search for the following value: Joe's Garage ....now please note the APOSTROPHE in the above string.
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8889
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8572
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2782
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 we have to send another system
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.