Re: writing a custom xml parser

From: Date: Fri, 23 Aug 2002 21:44:10 +0000
Subject: Re: writing a custom xml parser
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113861@lists.php.net to get a copy of this message
I think you're over-complicating the issue. Reasons: 1. Are you using an interface to build the scrips? 1.1. YES - then no one really cares what you do behind the interface - you might as well build PHP code behind and eval() afterwards; 1.2. NO - then your "language" is at least as complicated as PHP - only more limited and you have to type more. Which do you find simpler: <setvar>
     <name>test</name>
     <value>Hello World!</value>
</setvar> <print>
     <var>
         <name>test</name>
     </var>
</print> or <? $test="Hello world!"; echo($test); ?> 2. Do your target users have at least some basic scripting experience? 2.1. YES - then PHP is just as simple at basic functionality as anything else; 2.2. NO - then you'll need an interface, unless you want to teach them your XML tagging language instead. Go back to square 1.1. HTH Bogdan Orangehairedboy wrote:
I am looking to create my own xml based scripting language for a program I am writing. I know that all of the xml parsing tools are with PHP, but I'm not exactly sure how I would implement everything? Can anyone offer any advice, or has an open source scripting language parser for php already been written?? For those that want to know, the reason I'm not just using PHP, is that the product I'm creating needs to be so easy to use that no real programming experience is needed. Scripting is optional, but used when necessary to create custom actions. Take this for example: <setvar>
    <name>test</name>
    <value>Hello World!</value>
</setvar> <print>
    <var>
        <name>test</name>
    </var>
</print> <!-- Prints Hello World! --> or <setvar name="test" value="Hello World!"/> <print>
    <var name="test"/>
</print> <!-- Prints Hello World! --> Both scripts would do the same thing - and it's pretty human-friendly scripting. Can anyone offer advice how to make this work?? Thanks! OHB


« previous php.general (#113861) next »