mIRC Home    About    Download    Register    News    Help

Print Thread
#28055 04/06/03 05:04 AM
Joined: Mar 2003
Posts: 50
C
Babel fish
OP Offline
Babel fish
C
Joined: Mar 2003
Posts: 50
Native XML support would be nice and allow for yet another way of storing data. This however would allow for some unquie storage routines since an XML tag can hold many attributes for an item, and data. As well, theres the hierarchy which could make for items having child objects in which they are all related. Heres a conceptual view:

/xmlcreate <database name> <filename> [attribute one] [attribute one data] .... [attribute five] .... [data]

this creates a XML root tag which is the name and start of the database tree. If you use the command on the same filename but the <database name> is different this add's an additional database to the file.

/xmlfree <database name> <filename>

Removes the entire matching xml database from a file

/xmladd -c <database name> <filename> <parent item> <item> [attribute one] [attribute one data] .... [attribute five] .... [data]

this would add a new XML item to the specified database. The -c switch is for adding the new XML item under a specific parent XML item (adding a child item).

/xmlrem [-c] <database name> <filename> <parent item> <item> [attribute one] [attribute one data] ... [attribute five] ... [data]

this would remove a child or parent item (child item if switch is -c) from a database. If the optional parameters are supplied it would remove a givin attribute or the data from the XML item. If a parent XML item is removed, all child items within it are removed as well.

/xmlmod [-c] <database name> <filename> <parent item> <item> <attribute one> [attribute one data] .... [attribute five] .... [data]

this would modify data from any XML item such as attributes or data. If -c isnt specified it modifies the givin parent item.

Identifiers:

$xml(filename,database,[name/N],[attribute name/N])

returns $true/$false if database exists or not. If name/N is specified it returns the name or Nth item if it exsists. If it doesnt it returns $null. If name/N exists and attribute N is specified, It returns the Nth attribute name. You can use the .attrib property to get the data for that specific attribute

the $xml identifier also has these properties:

attrib = get attirubte data for an N item
data = get data associated with an item
element = returns item name

Other identifiers could be used for searching through the XML database as well. I'll stop with the detail because im sure my comments have been in-depth enough. Thanks smile
(Note: I know XML support can be done via a DLL currently, but native support would be very handy)

#28056 04/06/03 06:46 AM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
 
&lt;family&gt;
 &lt;father&gt;
  &lt;name=John /&gt;
  &lt;hobbies&gt;
   &lt;hobby1=movies /&gt;
  &lt;/hobbies&gt;
  &lt;work&gt;
   &lt;firm=mirc corp /&gt;
   &lt;rank=über 1337 h4x00r /&gt;
 &lt;/father&gt;
&lt;/family&gt;
 


How would you create that with your commands and how would you read info from it with your aliases/identifiers?


Code:
//if ( khaled isgod ) echo yes | else echo no
#28057 04/06/03 08:20 AM
Joined: Feb 2003
Posts: 309
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
I think this would be useless to add to mIRC for the simple reason of how little it really has to do with IRC.

Your man in the street user wouldn't know what to do with it, neither would a lot of scripters.

Its perfectly fine IMHO as a dll, because of its relatively small amount of use. If mIRC however started using XML for some of its own stuff (like script files, or whatnot) I would change my opinion, but as it stands it doesn't seem likely to happen.

Still, I do love my XML and I won't kick up a fuss if it did exist. *Hugs XML and tells it he loves it*

#28058 04/06/03 07:24 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Ok well let me start off by saying I hate XML. XML is the programming equivilent of Satan, XML exists to annoy and anger anyone who looks at it. That being said, I think XML would be great to add to mIRC. MS is now XML crazy. Just about all the new versions of MS garbage will be using XML, imho it would be pretty nice if you could for example, make something in mIRC that converts a snippet from a Word Document to mIRC and allow it to retain color, bold, underline and stuff. Ok no I wouldn't personally use it, but imho XML is here to stay and it is only going to become more and more a part of the internet. You're going to see more protocols that use XML to communicate, and other stuff like that. I think it would be useful.

#28059 17/06/03 01:13 AM
Joined: Jun 2003
Posts: 5
T
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
T
Joined: Jun 2003
Posts: 5
That would be GREAT !!!!!!!!!!!!!!!!!

#28060 01/02/04 12:33 AM
Joined: Feb 2004
Posts: 1
D
Mostly harmless
Offline
Mostly harmless
D
Joined: Feb 2004
Posts: 1
This would be great, I Wouldn't have to store everything in crappy INI files anymore.


Link Copied to Clipboard