Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Strings as Commands
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gordon ALLAN  
View profile  
 More options Feb 17 2002, 12:39 pm
Newsgroups: alt.lang.delphi
From: Gordon ALLAN <gor...@DONTEVENTINKOFSPAMMINGMEallanhome.net>
Date: Sun, 17 Feb 2002 17:38:49 +0000 (UTC)
Local: Sun, Feb 17 2002 12:38 pm
Subject: Strings as Commands
I have command
Document.Information.<element>.text

where <element> is a dynamically created string.
Document is of type Variant but becomes a DOM object for an XML file

How can I cast this string into the command so that, for instance, if
<element> was 'mickey' then I could make the command say

document.information.mickey.text:= 'mouse'

Any thoughts?

Thanks for now

Gordon ALLAN
gor...@allanhome.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maarten Wiltink  
View profile  
 More options Feb 17 2002, 1:13 pm
Newsgroups: alt.lang.delphi
From: "Maarten Wiltink" <maar...@kittensandcats.net>
Date: Sun, 17 Feb 2002 19:13:37 +0100
Local: Sun, Feb 17 2002 1:13 pm
Subject: Re: Strings as Commands

Gordon ALLAN wrote in message ...
>I have command
>Document.Information.<element>.text

>where <element> is a dynamically created string.
>Document is of type Variant but becomes a DOM object for an XML file

>How can I cast this string into the command so that, for instance, if
><element> was 'mickey' then I could make the command say

>document.information.mickey.text:= 'mouse'

document.information.getElementsByTagName('mickey'),
which would give you a nodelist, from which you could
conceivably extract the text by further coding.

When you say DOM, people might just expect it to work
the way the World Wide Web Consortium says it should.

Does this have any bearing on Delphi?

Groetjes,
Maarten Wiltink


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gordon ALLAN  
View profile  
 More options Feb 17 2002, 1:39 pm
Newsgroups: alt.lang.delphi
From: Gordon ALLAN <gor...@DONTEVENTINKOFSPAMMINGMEallanhome.net>
Date: Sun, 17 Feb 2002 18:38:28 +0000 (UTC)
Local: Sun, Feb 17 2002 1:38 pm
Subject: Re: Strings as Commands
This doesn't really work unfortiunately.

I am just using the following code to create the variant

  Document := CoDOMDocument.Create;
  Document.load('c:\info.xml');

I then can reference to each individual element and then text item as
follows/

document.elementname.subelement.text:='mouse';

I need to be able to manually create this subelement to be created
from 2 variables.

if I simply enter the command as document.elementname.var1+var2.text:=
mouse;

I end up with a subelement called var1+var2

Any oothe thoughts? The components I am using come from
http://www.cogisoft.fr/downloads

Thanks for now

Gordon ALLAN
gor...@allanhome.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gordon ALLAN  
View profile  
 More options Feb 17 2002, 1:48 pm
Newsgroups: alt.lang.delphi
From: Gordon ALLAN <gor...@DONTEVENTINKOFSPAMMINGMEallanhome.net>
Date: Sun, 17 Feb 2002 18:47:15 +0000 (UTC)
Local: Sun, Feb 17 2002 1:47 pm
Subject: Re: Strings as Commands
I don;t think that the url I included is the same product. I got it
from Trry at http://www.torry.net/vcl/system/ole/xmlauto.zip

Sorry about that

Gordon ALLAN


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »