FORUM ARCHIVED

XML validator gives me an error, but I can't find it.

Discussion in 'Modding' started by Pashow, Feb 2, 2014.

  1. Pashow

    Pashow Member

    I'm testing a very basic mod, just adding one item, its recipe and seeing if it works - hence the fact I use very basic materials. But I'm digressing. Here's the code:

    <craftDB>

    <craft hidden="0"
    <output skill="1" name="Quelaag's Furysword"/>
    <tool tag="smithing"/>"
    <input name="Rough Iron Sword"/>
    <input name="Ruby"/>"
    </craft>

    </craftDB>

    Looks good to me. XML Validator disagrees and tells me that "a name cannot start with the character '<', hexadecimal value 0x3C." I really can't figure out what's wrong with this, as the name doesn't in fact start with that character, and the game itself runs perfectly well - although neither the recipe nor the item are anywhere to be found. What am I doing wrong?
     
    OmniaNigrum likes this.
  2. Daynab

    Daynab Community Moderator Staff Member

    Just a heads up, sorry the forum caught your post as spam for whatever reason, so I had to approve it.

    Re: your post, I would guess that the missing bracket after craft hidden="0" is it?
     
    OmniaNigrum likes this.
  3. Pashow

    Pashow Member

    Well, I am an idiot.
    Edit: I fixed it and it is now giving me an error saying that the "beginning tag "craftDB" doesn't match with the end tag "craft". Here's what the code currently looks like for reference:
    <craftDB>
    <craft hidden="0"/>
    <output skill="1" name="Quelaag's Furysword"/>
    <tool tag="smithing"/>"
    <input name="Rough Iron Sword"/>
    <input name="Ruby"/>"
    </craft>
    </craftDB>
     
    OmniaNigrum likes this.
  4. Daynab

    Daynab Community Moderator Staff Member

    Your first craft tag doesnt need a closing craft tag, because it's already closed (see the />)

    Well, either that or you need to not close the first craft tag. I'm not sure which, not completely familiar with modding.
     
    OmniaNigrum likes this.
  5. Pashow

    Pashow Member

    Well, it isn't giving me any more errors, so yeah. Thanks a bunch! I just find it a bit strange, cause, I've been taking the expansion files for reference and I really couldn't see a flaw with it. I guess it's cognitive bias, that is, you tend to overlook your own problems.
    Edit: I now see what my mistake was, I put a closing tag /> at the top of the crafting when it should have been > and the closing tag </ should have went at the bottom. I wouldn't have figured it out without your support so thanks a lot!
     
    OmniaNigrum likes this.
  6. Vitellozzo

    Vitellozzo Member

    It's
    Code:
        <craftDB>
        <craft hidden="0">
        <output skill="1" name="Quelaag's Furysword"/>
        <tool tag="smithing"/>"
        <input name="Rough Iron Sword"/>
        <input name="Ruby"/>"
        </craft>
        </craftDB> 
    <craft>, hidden or not, must be free from "/", since it's the opening of the crafting recipe; it's closed with </craft>.
     
    OmniaNigrum likes this.