xml error "attachment" must match "(option)+"
-
not sure what this means. Things were going pretty good so I didn't test for a while and it'll take a lot of time to track down. Here's the error:
Here's the xml line in question ( the cursor is 9953
" "
Any help is appreciated.
ThanksI should add that it throws it when I start triplea but when I fire up the game it doesn't prevent it from running.
-
SAXParseException have been tricky for me in past. Some actually led me on wild goose chases that I could only resolve by reverting to an older version of files. Led me to believe some files became corrupted.
Anyways that being said, try searching the xml for "(option)+". It seems to be referring to that specifically.
-
@general_zod Thank you. Yea searched on the web and got a bunch of irs and amazon things. Anyway I'll give it a shot.
I should no better by now not to get in a hurry and test every change : ) -
@beelee The error indicates that the "attachment" block must only have "option" elements inside it. I don't see any obvious error. Can you post the entire XML?
-
@redrum Thanks redrum. I'm thinking I changed some stuff with the "conditionAttachmentConvoyAndBlockade" gonna check now. Here's xml:
0_1518230839630_Global_40_House_Rules_Canada.xml
@General_Zod yea didn't find "(option+)" Think I jacked something up in either a trigger or that condition
-
@beelee This appears to be the problem:
<attachment name="triggerAttachment_Militia_For_All" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="trigger" value="conditionAttachmentMilitia_For_All"/> <option name="productionRule" value="productionGermans:buyMilitia"/> <option name="productionRule" value="productionRussians:buyRussian_Militia"/> <option name="productionRule" value="productionJapanese:buyJapanese_Militia"/> <option name="productionRule" value="productionAmericans:buyMilitia"/> <option name="productionRule" value="productionBritish:buyMilitia"/> <option name="productionRule" value="productionUK_Pacific:buyMilitia"/> <option name="productionRule" value="productionItalians:buyMilitia"/> uyDestroyerC5"/> <option name="productionRule" value="productionFrench:-buyDestroyer"/> <option name="productionRule" value="productionFrench:buyDestroyerC5"/> <option name="when" value="before:germansPurchase"/> <option name="uses" value="1"/> </attachment>
You have some random text in that attachment.
Here is a fixed version: 0_1518231353705_global_40_house_rules_canada_FIXED.xml
-
@redrum Right on ! How did you track that if it's not to lengthy to explain ?
Thanks for your time
-
@beelee Opened the XML and scrolled down to about the line you got the error on. I think you're text editor must mark the lines differently (maybe counts wrapped lines as 2). I use Notepad++.
-
@redrum right on. I need to learn notepad. on emacs. So look in the neighborhood anyway. Cool thanks again. Saved hours of time Heppster Rock Image
-
Yep notepad++ is the best way to go. This (option)+ is misleading too. Would be nice if it could list the unrecognized text instead. But I guess that's a moot point since the line numbers were in fact correct if in notepad++
-
@general_zod (option)+ stands for the XML constraint that is being broken. It essentially says that you can only have "1 or more option elements inside attachment". Which pretty much means you either have some other invalid element like in this case or misspelled one of them.