Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As pap already mentioned... this is quite a complex thing to do, when it's just to learn XML, still if you'd want to continue, there are a few things you should get / create in order to get the thing done...</p> <ul> <li><p>the first thing you should get / create is a java parser, which can "break-up" java code into operators, parameters and such which you can use to build your xml representation</p></li> <li><p>The second thing to achieve is to create a schema ( xsd ) which fully describes your xml based language ( more or less like BNF, but then in XML ) </p></li> </ul> <p>a piece of transformed "Hello World" code could for instance look like this (although I'm more of a c# guy)</p> <pre><code>&lt;invokeMethod fullname="Console.WriteLine, mscorlib"&gt; &lt;param type="System.String"&gt;Hello World!&lt;/param&gt; &lt;/invokeMethod&gt; </code></pre> <p>So there needs to be a schema definition for "invokeMember" which requires a fullname attribute and 0 or more param elements... and so on.</p> <p>If you got that covered, you'll need to create a sort of "code-generator" ( known as a lexer if I'm not mistaken ) which will convert the parsed java code to XML conforming the schema.</p> <p>And then you're only halfway... </p> <p>You could use a xml stylesheet to ultimately transform the XML to another language-type ( which also is quite a difficult task to achieve )</p> <p>Still... these are just pointers to get you started... and if you do choose to undertake this project... I wish you good luck :-) </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload