forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


XML support
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Dec 10, 2004 5:54 pm    Post subject: XML support Reply with quote

I'm currently evaluating ways of supporting XML in the next version of VDS, but I'm having trouble deciding which way to go.

1. We could use the Microsoft XML DOM support that comes with IE 5 and above. This would give access to some powerful features, not all of which couild necesarily be exposed in VDS, but it is fairly slow and memory hungry, and depends on all the IE 5 components being correctly installed and registered.

2. We could have a "lightweight" native VDS implementation, which will be fast, low on resources and not depend on anything, but it would inevitably not be quite as sophisticated (I'm particularly thinking about searching) and might have trouble reading some of the XML files out there.

I'm leaning towards 2 because I'm thinking about giving VDS the option of XML-based configuration files, and also considering the possibility of an XML-based resource file for localizing applications.

Would plain text XML files be adequate for foreseeable needs? It appears that XML files can be Unicode, and currently my home-grown implementation can't read these, nor can it deal with fancy encoding methods like UTF-8 etc. I really need some input from those who asked for XML support.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Fri Dec 10, 2004 8:31 pm    Post subject: Reply with quote

I really think basic XML reading is enough. I implemented such a thing in PHP awhile back as I needed to read php files and I did not want to install an entirely xml parsing package on the server (even though there is one now Smile).

Basically it looks for xml type containers like: <name> </name> and reads in between those using substrings and position functions.

Something like that could be made for VDS even using a DSU, it could even get more sophisticated by searching for child nodes etc by doing something like this:

XML SETNODE,<customer>
XML SETNODE,<contact>
XML SETNODE,<phone>

With the XML document having a layout like:

Code:

<xml>
  <customer>
    <contact>
      <address>1234 W. NoWhere Street</address>
      <phone>123-345-6789</phone>
    </contact>
  </customer>
</xml>


Thus you could keep using the SETNODE to keep going down levels into the xml and intead of getting <address> could get <phone>, etc.

You could also add commands like:

XML RESETNODE

Which would clear/reset the node allowing you to do a new search starting from teh beginning of the xml file.

More commands:

XML DELETENODE. Which would delete an entire node structure and all child nodes within it.

XML WRITENODE. Which allows you to modify the contents of the currently set node.


Functions:

@xml(getnode) - returning the contents of the node.
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Dec 11, 2004 9:54 am    Post subject: Reply with quote

How about reading XML like this? I think I like it this way most, because XML files are basicly the same as INI files (key=value).

Code:
xml write,customer,contact,address,6512 HF SomeWherePlace
@xml(read,xustomer,contact,address)
@xml(read,xustomer,contact,phone)



Code:
<xml>
  <customer>
    <contact>
      <address>1234 W. NoWhere Street</address>
      <phone>123-345-6789</phone>
    </contact>
  </customer>
</xml>

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Sat Dec 11, 2004 1:59 pm    Post subject: Reply with quote

We'll definitely have something a bit more capable than what you're asking. PG.

Regarding the syntax, you need somewhere to specify what xml file you're accessing, just like a stringlist or a file, so it will probably be more like:

Code:
XML WRITE,%%myxmlfile,/customer./contact/address,6512 HF SomeWherePlace


Also I'm planning on an extension to the INIFILE command:

INIFILE OPEN,myconfig,ini,XML

which will read/write to an XML file using all the standard INI file commands/functions. There will probably be a demo script that can read an INI file and convert it to XML format.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Dec 13, 2004 3:36 pm    Post subject: Reply with quote

Jules,
You prob. already know about the rudamentry XML parse function I wrote in pure VDS if not here is the link to the posting.

http://www.vdsworld.com/forum/viewtopic.php?t=2779&highlight=xml+parser

Anyway I personally would not use the XML parser that Microsoft has since they are trying to phase that out in favor for DotNET. There are many XML libraries out there that do not depend on Microsoft's XML objects. IMHO I think adding XML to VDS should be an exercise for the VDS programmer unless you need this for DotNET or some other command or function.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Dec 13, 2004 4:30 pm    Post subject: Reply with quote

There have been a number of requests for XML support in VDS. Although the capabilities will be fairly lightweight I feel sure that they will be more powerful and faster than anything written in pure VDS. The XML support will include simple XPath-like queries, so it will be usable for small databases as well as configuration files.

I agree with you that it would be undesirable to rely on the Microsoft XML parser, because Microsoft has such a cavalier attitude to backward compatibility that programs could be made obsolete on a whim.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Dec 13, 2004 5:57 pm    Post subject: Reply with quote

That's cool Jules and actually after some thought I realized that by offering XML you would be "killing 2 birds with one stone". You would be giving people a simple but effective database system not bound to a particular database backend and straight forward communication over the internet with said backend databases. It's more or less a good mariage VDS is based on strings and so is XML Wink
The hardest part of XPath is the use of wild cards for data elements of the same name. Also I don't know if I updated the VDS code from the post I mentioned above with my latest version so if anyone is using it there may be a bug in that code. I will check and update it later.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Wed Jan 12, 2005 5:20 am    Post subject: Reply with quote

Hello Jules,

An online buddy sent me a link to a very nice XML Parser for Delphi. Seems it is standalone and does not require any 3rd party engines to be installed. Take a look:

http://www.destructor.de/xmlparser/index.htm


This may be something you might want to look at for vds.
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Jan 12, 2005 2:22 pm    Post subject: Reply with quote

Hi PG.

The VDS XML support is just about done. I seem to remember that I looked at that page, but it is just a parser. It is for reading an XML file only. I needed both read and write support for VDS.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
ripburn
Newbie


Joined: 23 Dec 2004
Posts: 22

PostPosted: Mon Jan 17, 2005 8:58 am    Post subject: Reply with quote

jules wrote:
The VDS XML support is just about done.

Will the XML support be available before VDS6?

Cheers.

_________________
RipBurn
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Jan 17, 2005 9:32 am    Post subject: Reply with quote

No, it's a development for the VDS 6 runtime. Don't see how it can be.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
ripburn
Newbie


Joined: 23 Dec 2004
Posts: 22

PostPosted: Mon Jan 17, 2005 10:11 am    Post subject: Reply with quote

jules wrote:
No, it's a development for the VDS 6 runtime. Don't see how it can be.

Ok.. thanks for that Jules. btw, is there any ETA for VDS6 yet?

Cheers.

_________________
RipBurn
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Jan 17, 2005 12:02 pm    Post subject: Reply with quote

I've no idea. I'm just the programmer. My guess would be some time this summer.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Mon Jan 17, 2005 2:15 pm    Post subject: Reply with quote

I would go with solution 2 Jules.


In case you did not know, the company I work for bought VDS 1.5 years ago, and here we use a lot of XML. It will be very helpful to XML support in VDS in the near future..

Thanks for adding it.


Last edited by marty on Mon Jan 17, 2005 4:35 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Mon Jan 17, 2005 2:16 pm    Post subject: Reply with quote

I might give you an XML message example, if I can of course.. I will ask here
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group