Unique Production Editing of Raw XML File
Posted: Fri Feb 15, 2008 4:43 am
I'm developing an import of data from Basecamp into Access. The import file is in XML format and nests ToDo-Items in an array under the parent ToDo-List without adding the ListID in the Item. Without the ListID I cannot relate Items to the List in Access. The structure looks like this:
Somehow I need to copy the List Id and insert it into each of the child items. Some Lists have no items and others vary in number, each Item needs that List ID.
The format of the sub-structure is consistent as far as the fields, but some fields include message text that screws up a template. I can search for <todo-list> and know there is a field <id ....>. Also that if there is an item, it will be after the <id...> and before </todo-list>. Obviously I'm not very experienced in RE.
Sorry for the details, but I've spent 2 expensive days now looking for the answer. I don't know if Textpad is the right tool. I thought about Perl but haven't ever used it and I've been with Textpad since the very early days. Also, I canot change the source file XML type, but I can convert it to another type as long as it can go into Access.
OK, that's it. Please point me in the right direction!
Earle
Code: Select all
<todo-list>
<fields>
<id type="integer">1330719</id> <<=What I need in the item
<more fields>
<todo-items type="array">
<todo-item> ========= ToDo Item Start
<fields>
<fields>
</todo-item> ========= ToDo Item End
<todo-item>
<fields>
<fields>
</todo-item>
</todo-items>
</todo-list>
The format of the sub-structure is consistent as far as the fields, but some fields include message text that screws up a template. I can search for <todo-list> and know there is a field <id ....>. Also that if there is an item, it will be after the <id...> and before </todo-list>. Obviously I'm not very experienced in RE.
Sorry for the details, but I've spent 2 expensive days now looking for the answer. I don't know if Textpad is the right tool. I thought about Perl but haven't ever used it and I've been with Textpad since the very early days. Also, I canot change the source file XML type, but I can convert it to another type as long as it can go into Access.
OK, that's it. Please point me in the right direction!
Earle