TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

XML Parsing

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Sat Mar 08, 2014 6:10 pm    Post subject: XML Parsing Reply with quote

Would it be too much to ask for XML parsing as a tintin feature? Smile

It could be implemented pretty simply:
1. If an <XML> start tag is received, wait for the corresponding </XML> tag.
2. If another <XML> start tag is received before the corresponding </XML> tag was received, automatically terminate the starting <XML> tag - at least on my MUD there are no nested XML strings.
3. if an <XML> start tag has not been recieved but some text is received, don't pass it to the XML parser.

Leave it up to the user to define #XML commands to handle received XML lines.

If the mud sends <roomname>The room's name</roomname> then user can define a handler:

Code:
#xml {roomname}
{
    #nop we could capture the roomname using this handler, do some things   ...;
    #map name %0;

    #nop then like #function or #script, we could either set the value to      ;
    #nop return or we use #return to return it. The returned value could be    ;
    #nop modified, like adding ansi coloring, before being parsed as normal    ;
    #nop and displayed.                                                        ;

    #return <aef>%0;
}
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 09, 2014 12:59 pm    Post subject: Reply with quote

You should be able to create some kind of trigger for it using the RECEIVED OUTPUT event and the #regex command.

Not something I want to implement.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group