Integration and CDATA

Help
Shirkit
2010-05-02
2013-05-01
  • Shirkit
    Shirkit
    2010-05-02

    Hello,

    First, I would like to say congrats for such great software. I'm using him for 1 month to test and re-test, and it's just perfect, it attend to all my needs. I took some time to fully understand the configuration process, and once I did, I created the most perfect editor to my XML editing. Thank you!

    The thing is, I have 2 questions

    Can I foce the Jaxa to do this?

    <main>
    <entry><![CDATA[Lorem ipsum dolor]]></entry>
    </main>
    

    I want to force the content of a XML entry to be in the CDATA tag, because I need to use the '<' '>' characters, and that's only possible within the CDATA tag.


    The other thing is, I'm building a software where my database is XML files, wich I have already set up the configuration. But the thing is, my software must run on Windows/Linux/Mac, and I couldn't manage to explore the source code and make it work perfectly. So, I was thinking of run directly the Jaxe without modifying the source code, loading the XML file with my configuration model in Windows/Mac/Linux. Can you help me to do it?

     
  • You can't force Jaxe to use a CDATA section, unless you create your own Jaxe element (as explained in the developer guide). But nothing prevents you from entering '<' and '>' characters within a string (they would be stored as the XML entities &lt; and &gt;). Actually,

    <entry>&lt;</entry>
    

    is strictly equivalent to

    <entry><![CDATA[<]]></entry>
    

    . So I would argue that there is something wrong with whatever is using the document afterwards if it makes a difference between the 2.

    I'm not sure I understand what the problem is with loading a file with Jaxe. If you want to do it with the command-line, you can use :
    - on Linux/UNIX : jaxe.sh file.xml
    - on MacOS : open -a Jaxe file.xml
    - on Windows : Jaxe.exe file.xml ou jaxe.bat file.xml
    If you want to make sure people use your configuration file when creating a new file, you can just remove the other ones from the config folder.

     
  • Shirkit
    Shirkit
    2010-05-03

    Yep, but the problem is I want just 1 folder with Jaxe within that can work with any OS. My program will detect the OS, and I did found the way to open it in Linux and in Windows, but the MacOS I couldn't manage to do it =/

     
  • Why don't you put the 3 versions of Jaxe in the same folder ?

    Jaxe for MacOS is a MacOS X application, and behaves as such, with a top menubar, support for application events etc… If you run it like a UNIX program, it won't behave in the same way and Mac users will be disappointed. That being said, you could just run Jaxe on MacOS X like you do on UNIX, with the UNIX version and jaxe.sh.

     
  • Shirkit
    Shirkit
    2010-05-03

    The main problem is that the MacOS version of Jaxe is in .dmg extension, and I couldn't manage to open without harming it's conetent. I'm thinking in two things:

    The user download the software. After downloading the software, when he runs for the first the the Jaxe module, it find the OS running and download the Jaxe and put it on a sub-folder, and then runs Jaxe. On Windows/Linux, I found a easy way, because I simply extract the files and then run it. But in Mac, I have no clue how to do it, beucase the file extension is DMG.

    The other solution is to simply use the JAR's files, no .exe, .sh or anything else. Like this, will it behave nice in all OS?

    What do you suggest?

     
  • I see. I didn't know you didn't have access to a Mac (I wonder how you will test your software). You could try to find some software to open a dmg. For instance (found with google) :
    - dmg2img : http://vu1tur.eu.org/tools/
    - TransMac : http://www.asy.com/
    - UltraISO : http://www.ezbsystems.com/ultraiso/
    - MacImage - http://www.macdisk.com/macimgen.php3

    > The other solution is to simply use the JAR's files, no .exe, .sh or anything else. Like this, will it behave nice in all OS?
    Maybe, if you run it from Jaxe's folder : java -jar lib/Jaxe.jar
    …but you should really try it to make sure.

     
  • Shirkit
    Shirkit
    2010-05-03

    I'm planning to have acess to a Mac, but it isn't that easy around here, just 2 people I know have a Mac around here, and having acess to it won't be easy, that's why I want to double check if I can do something before testing the software. I will try these 2 solutions and sees wich of them fits the best. Anyway, thanks for your time an this great software.