0
\$\begingroup\$

I'm new to nifty. I am trying to learn how to create nifty GUI in JMonkey Engine game. I'm going through tutorials and tried to run project. Project runs fine but I get following error when I tried to edit xml:

Cannot find declaration of element nifty

Below is my start.xml code:

<nifty xmlns="http://nifty-gui.sourceforge.net/nifty.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty.xsd http://nifty-gui.sourceforge.net/nifty.xsd">
<useStyles filename="nifty-default-styles.xml" />
<!-- Screen Codes here-->
</nifty>

I guess most possible reason is that above namespace might have been deprecated and already been replaced. Or there might be other steps that I have to perform in JME SDK to make it recognize nifty tag. Please Help.

\$\endgroup\$
1
\$\begingroup\$

Try the following, tested in JMonkey SDK 3.0:

<?xml version="1.0" encoding="UTF-8"?>
<nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd">
    <useStyles filename="nifty-default-styles.xml" />
</nifty>
\$\endgroup\$
  • \$\begingroup\$ Your namespace is working. All we needed was to include version for nifty. thanks \$\endgroup\$ – Crawler Apr 14 '16 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.