McGreagor Posted April 7, 2015 Share Posted April 7, 2015 I am attempting to fill a deck of cards data similar to a TCG into a xml file so I can pull the data from it later in Unity using C#. The error I am getting when trying to run it in any web browser is: This page contains the following errors:error on line 6 at column 8: error parsing attribute name Below is a rendering of the page up to the first error. Here is the code starting at line 6: <cardId ="01"> <type name = "Boss"> <title>Gorgona</title> <xp>500 XP</xp> <treasureIcon>Treasure</treasureIcon> <heading>Queen of Medusia</heading> <levelUp>Level Up: Choose a Hero in town. Immediately kill that Hero and place it face-down in your scorekeeping area.</levelUp> </type> </cardId> I've looked over it but can't find what I am missing. If anyone could provide an answer that would be ideal. I am sure its something simple I am missing but I don't see it. Link to comment Share on other sites More sharing options...
Ingolme Posted April 7, 2015 Share Posted April 7, 2015 This isn't valid XML <cardId ="01"> Perhaps you meant <card id="01"> or <cardId>01</cardId> Link to comment Share on other sites More sharing options...
McGreagor Posted April 7, 2015 Author Share Posted April 7, 2015 Ok i attempted to fix this but still getting an error, you'll have to excuse me but my experience in xml is little. Error now is: This page contains the following errors:error on line 6 at column 8: error parsing attribute name Below is a rendering of the page up to the first error. Fixed code starting at line 5 ending at 13: <card Id ="01"> <type name ="Boss"> <title>Gorgona</title> <xp>500 XP</xp> <treasureIcon>Treasure</treasureIcon> <heading>Queen of Medusia</heading> <levelUp>Level Up: Choose a Hero in town. Immediately kill that Hero and place it face-down in your scorekeeping area.</levelUp> </type> </card Id> And thanks for helping love this site! Link to comment Share on other sites More sharing options...
Ingolme Posted April 8, 2015 Share Posted April 8, 2015 This isn't valid XML: </card Id> It should be just </card> I don't think it's a requirement in XML, but it would be better if you don't have spaces between your attribute names and values. You should read the XML tutorial: http://www.w3schools.com/xml/default.asp You need to understand the proper syntax for an XML document as well as what elements, tags and attributes are. Link to comment Share on other sites More sharing options...
McGreagor Posted April 8, 2015 Author Share Posted April 8, 2015 Found out my issue thank you! I appreciate you helping a newbie. Everything's working now! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now