Hi Zeuss - thx for the good work with the parser! I notice messages like 'Missing NPC token for...' while parsing DDI Material. Is there a good way to get token items from anywhere?
all the best, halbert
Printable View
Hi Zeuss - thx for the good work with the parser! I notice messages like 'Missing NPC token for...' while parsing DDI Material. Is there a good way to get token items from anywhere?
all the best, halbert
They just did an update to their site and I tried scraping the Players Handbook again and received not data in reference to non-magical items (i.e. regular swords, regular armor, etc...)Quote:
still if your not prepared to wait until October it might be your only option at the moment.
Anyone have any ideas on how i can fix this?
ive also encountered problems when trying to parse player handbook.
I'm using the latest version of the 4EParser (4.0.118.0) and am running into the following error when I try to parse a scrape of the Player's Handbook from D&DI.
Here is what shows up in the txt file:Quote:
4/12/2011 6:56:37 AM : ERROR:System.Xml.XmlException: The '<' character, hexadecimal value 0x3C, cannot be included in a name. Line 7, position 21.
<root version="2.2">
<!-- Modified from existing reference guide by JMnITup -->
<item>
<category name="Player's Handbook" mergeid="" baseicon="2" decalicon="1">
*** <curseforgedarmor<spanclass=_milevel_>level3uncomm on_001>
<name type="string">Curseforged Armor<span class="milevel">Level 3 Uncommon +1</name>
<class type="string">Armor</class>
<subclass type="string">Chain, Scale</subclass>
<level type="number"> 1</level>
<cost type="string">680 gp</cost>
All of the magic items I scraped follow the same format, so I'm sure as soon as I fix this one I'll need to fix all the rest. Any ideas as to what the fix would be?Quote:
Curseforged Armor<span class="milevel">Level 3 Uncommon Level 1+
In ancient days, the tieflings poured their bitterness into their forges as a lesson to those who would betray them.
Price: 680 gp Armor: Chain, Scale Enhancement: +1 AC
Power (Daily): Immediate Reaction. You can trigger this power when an enemy hits you with an attack. That enemy takes a –2 penalty to attack rolls (save ends). When the enemy saves against the penalty, the enemy takes a –1 penalty to attack rolls (save ends).
I believe the string "<span class="milevel">" is what's causing the issue. Most had the same issue so make a backup of the scrape, so you have a backup of the raw scrape, then go in with a text editor and anywhere you find the string "<span class="milevel">" replace it with a single space.Quote:
Originally Posted by dihmwhit
Some text editors like Notepad+ or my favorite EditPlus have a Search & Replace function where you enter the string and the replacement. Let it scan the entire doc and do it's thing then save and re-parse and see if that helps.
For that matter, I get errors trying to parse the Monster Manual too.
Quote:
4/12/2011 7:45:24 AM : ERROR:System.Xml.XmlException: The 'h1' start tag on line 23705 does not match the end tag of 'languages'. Line 23705, position 56.
<powertype type="string">M</powertype>
<mm3mode type="number">1</mm3mode>
</id-00003>
</powers>
<alignment type="string">unaligned</alignment>
*** <languages type="string">-<h1 class="atwillpower"></languages>
<skills type="string">Stealth +13</skills>
<strength type="number">22</strength>
<constitution type="number">18</constitution>
<dexterity type="number">11</dexterity>
Awesome, that worked perfect. I wasn't sure if it was an element that needed to stay for the parser or not, but I guess not!Quote:
Originally Posted by Ictinike
Edit: It appears removing the h1 class issue from 2 places worked, so that problem is solved too (I hope). Thanks for the speedy reply.
You have an open H1 tag inside your languages tag. You have to have a closure because of the XML standards.
*** <languages type="string">-<h1 class="atwillpower"></languages>
Something like:
*** <languages type="string"><h1 class="atwillpower">-</h1></languages>
I am getting this message when trying to parse the files I downloaded from DDI for the MM1. :
6/28/2011 8:27:31 PM : ERROR:System.Xml.XmlException: The 'p' start tag on line 167 does not match the end tag of 'equipment'. Line 167, position 84.
<constitution type="number">31</constitution>
<dexterity type="number">25</dexterity>
<intelligence type="number">12</intelligence>
<wisdom type="number">29</wisdom>
<charisma type="number">14</charisma>
*** <equipment type="string">lightning sword, flaming whip<p class="publishedIn"></equipment>
<token type="token">tokens/MonsterManual/balor.png@MonsterManual</token>
</balor>
<abolethlasher>
6/28/2011 8:27:31 PM : Checking XML
Thanks for any help you can provide :)
This line of xml is missing the closing </p>. It should look something like this.Quote:
Originally Posted by khersheyjr
<equipment type="string">lightning sword, flaming whip<p class="publishedIn">some text</p></equipment>
The cause of the problem is the item entry in the item text file you are attempting to parse. There are many problems with the data scrapped from the Compendium that need to be tied up or fixed to parse without error.
For a quick fix you can simply edit the xml output in Notepad or other such text editor. But if you intend to use this file again in the future you should aim to fix the item entry the text file or you will get this error everytime you attempt to parse it.