473,804 Members | 3,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xmlpath by xmldom

Hello,
How can I use xmlpath technogy by xmldom.
(or there is another technique, but not xmldom).

I need some code samples, please.

Thanks :)

Nov 11 '05 #1
8 3648
Mr. x wrote:
How can I use xmlpath technogy by xmldom.
(or there is another technique, but not xmldom).


It's quite big topic. You have to read about XPathNavigator to
understand how to work with XPath in .NET:
http://msdn.microsoft.com/library/en...tframework.asp

And particularly about using XPath with DOM:
http://msdn.microsoft.com/library/en...navigation.asp

--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2
I used the XMLDOM in javascript,
so I succeed in doing :
var myXML;
var x;
myXML = new ActiveXObject(" Microsoft.XMLDO M");
....
myXML.loadXML(m y_xml_text);

x = myXML.selectSin gleNode("//*");

what should I do in order to get the "x" contents ?
In VB, there is no problem :
msgBox x.xml

, but it doesn't work on JavaScript.

Help, please.

Thanks :)

"Oleg Tkachenko" <oleg@NO_SPAM_P LEASEtkachenko. com> wrote in message
news:eI******** ******@TK2MSFTN GP10.phx.gbl...
Mr. x wrote:
How can I use xmlpath technogy by xmldom.
(or there is another technique, but not xmldom).
It's quite big topic. You have to read about XPathNavigator to
understand how to work with XPath in .NET:

http://msdn.microsoft.com/library/en...tframework.asp
And particularly about using XPath with DOM:
http://msdn.microsoft.com/library/en...navigation.asp
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #3
the my_xml_text is the contents of a table.
<table id = "aTable"
</table>

I get the my_xml_text by :
aTable.tBodies[0].innerHtml.

What I get is not well formed xml,
and the <table id = "aTable"> , i.e, is without the ",
I meant it is <table id = aTable>.

I know that XHTML is well formed XML,
so is it good thing I translate my HTML file to XHTML ?
Is there any function to translate HTML file to XHTML ?

Thanks :)

"Mr. x" <a@b.com> wrote in message
news:eN******** ******@tk2msftn gp13.phx.gbl...
I used the XMLDOM in javascript,
so I succeed in doing :
var myXML;
var x;
myXML = new ActiveXObject(" Microsoft.XMLDO M");
...
myXML.loadXML(m y_xml_text);

x = myXML.selectSin gleNode("//*");

what should I do in order to get the "x" contents ?
In VB, there is no problem :
msgBox x.xml

, but it doesn't work on JavaScript.

Help, please.

Thanks :)

"Oleg Tkachenko" <oleg@NO_SPAM_P LEASEtkachenko. com> wrote in message
news:eI******** ******@TK2MSFTN GP10.phx.gbl...
Mr. x wrote:
How can I use xmlpath technogy by xmldom.
(or there is another technique, but not xmldom).


It's quite big topic. You have to read about XPathNavigator to
understand how to work with XPath in .NET:

http://msdn.microsoft.com/library/en...tframework.asp

And particularly about using XPath with DOM:

http://msdn.microsoft.com/library/en...navigation.asp

--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel


Nov 11 '05 #4
Mr. x wrote:
I know that XHTML is well formed XML,
so is it good thing I translate my HTML file to XHTML ? Depends on. Must be some reason you want to translate it to XHTML, but
you didn't told us why.
Is there any function to translate HTML file to XHTML ?

Google for "HTML Tidy".
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #5
Hello,

I am trying to translate a table to an xml format and vice versa,
so I send it from client to server (or client to web-service), and vice
versa - that's all.
Maybe I don't get to the point, and there is a better solution for this then
using xml - please let me know.

Thanks :)

"Oleg Tkachenko" <oleg@NO_SPAM_P LEASEtkachenko. com> wrote in message
news:eB******** ******@tk2msftn gp13.phx.gbl...
Mr. x wrote:
I know that XHTML is well formed XML,
so is it good thing I translate my HTML file to XHTML ?

Depends on. Must be some reason you want to translate it to XHTML, but
you didn't told us why.
Is there any function to translate HTML file to XHTML ?

Google for "HTML Tidy".
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #6
Mr. x wrote:
I am trying to translate a table to an xml format and vice versa,
so I send it from client to server (or client to web-service), and vice
versa - that's all.


So just send piece of HTML to server as string, on server-side convert it to
XML (in .NET you can use SgmlReader for that).
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #7
Mr. x wrote:
I used the XMLDOM in javascript,
so I succeed in doing :
var myXML;
var x;
myXML = new ActiveXObject(" Microsoft.XMLDO M");
...
myXML.loadXML(m y_xml_text);

x = myXML.selectSin gleNode("//*");

what should I do in order to get the "x" contents ?
In VB, there is no problem :
msgBox x.xml


The same in javascript:

<html>
<head>
<title />
<script type="text/javascript">
var myXML;
var x;
myXML = new ActiveXObject(" Microsoft.XMLDO M");
myXML.loadXML(" <foo>bar</foo>");
x = myXML.selectSin gleNode("//*");
alert(x.xml);
</script>
</head>
<body />
</html>
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #8
Thanks ...

Can you give me a code sample, please.

Thanks :)

"Oleg Tkachenko" <oleg@NO_SPAM_P LEASEtkachenko. com> wrote in message
news:e5******** ******@TK2MSFTN GP09.phx.gbl...
Mr. x wrote:
I am trying to translate a table to an xml format and vice versa,
so I send it from client to server (or client to web-service), and vice
versa - that's all.
So just send piece of HTML to server as string, on server-side convert it

to XML (in .NET you can use SgmlReader for that).
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #9

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

Similar topics

1
2142
by: Mike Labman | last post by:
I'm parsing an XML document using the XMLDOM object in ASP. I am running into a problem with a section formatted like this: <MasterElement> TitleOfElement <Abbreviation> TOE </Abbreviation> </MasterElement>
3
18828
by: reclusive monkey | last post by:
I am just starting out with XML. I've been playing with XML and XSLT, very nice indeed. I particularly like the filtering/ordering functions. Anyway, I have started to have a look at scripting, and would like to use JavaScript as then I use Firefox as well as IE (tried some VBScript, fine in IE of course but no go in Firefox). I have copied an example from "XML Unleashed", but when I try it, I get the following error; A Runtime Error...
0
305
by: BCM | last post by:
In ASP 3, I once did a page using javascript and XMLDOM that loaded up xml files, displayed their data, and automatically refreshed that data at 10 second intervals (not a whole page refresh: just the data in the particular node I wanted to display). The javascript looked something like: function GetData() {
7
1557
by: joe | last post by:
I am having problems checking for the value of an XMLDOM object . Lets say my XMLDOM object was successfully created as objXMLDoc, and that has several nodes on it. In the case of a VBScript loop like below: '------------------- For x = 1 To 10 Set oItemPrice = objXMLDoc.selectSingleNode("//Item/Price")
2
1991
by: jfizer | last post by:
I have a web app that uses a form with its fields populated from XML using Microsoft.XMLDOM. The problem is that Microsoft.XMLDOM functions seem to run on their own thread, so I dont know when the fields are done populating. Can anyone think of a way for me to check when the following function finishes? function importXML(xmlQuery,xmlSrc,xmlTarget) {
3
4282
by: Robert Zurer | last post by:
Hello all, I want to load an in-memory XmlDocument from the server to the client and create an XMLDOM object using javascript. I can do it from a url by calling this Javascript from the client. var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.load("url of the persisted file");
0
960
by: Robert Zurer | last post by:
Hello all, I want to load an in-memory XmlDocument from the server to the client and create an XMLDOM object using javascript. I can do it from a url by calling this Javascript from the client. var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.load(url);
2
5058
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have the following code which I try to load an xml file, but in browser, I only get text value for each node, not whole xml string. I expect to see something like <name firstName="betty" lastName="Smith">I am at home</name> But I only see text "I am at home" did I do something wrong? Set xmlDom=CreateObject("Microsoft.XMLDOM") XMLDom.async =False
1
4229
AnuSumesh
by: AnuSumesh | last post by:
Hi, I want to read the text property of XML file. My xml file is as follows: <?xml version="1.0"?> <Domain_Credentials> <User> anu </User>
0
9706
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
10335
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
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
9157
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...
1
7621
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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
3821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2993
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.