Home Hex Edit Home Page
Hex Edit Features Hex Edit Features
Button Testimonials
Button Screen Shots
Button Downloads
Button Forums Home
Button HexEdit FAQ
Button Known Bugs
about help privacy register
Forums
Search Members Help

» Welcome Guest
[ Log In :: Register ]

 

[ Track This Topic :: Email This Topic :: Print this topic ]

reply to topic new topic new poll
Topic: Import definitions into template files< Next Oldest | Next Newest >
 Post Number: 1
XTAL256 Search for posts by this member.

Avatar



Group: Members
Posts: 30
Joined: Jul. 2009

Member Rating: 5
PostIcon Posted on: Jul. 19 2009,16:26  Skip to the next post in this topic. Ignore posts   QUOTE

I mentioned this in another post but i think it would be extremely useful so i will expand on the idea here.
There should be an xml element which would allow you to import/include another xml file in a template xml file. Similar to the #include C/C++ statement (or import in Java). Ideally it should include the entire file almost like copy-pasting it, and would be used at the start of a <binary_file_format> element like so:
CODE

<binary_file_format name="MP3">
   <include file="some_stuff.xml"/>
   <include file="more_stuff.xml"/>
   <use_struct name="aStruct" expr="" type_name="STRUCT"/>   <!-- Defined in "some_stuff.xml" -->
</binary_file_format>


That should be quite simple to implement as you would just copy the entire text, minus anything outside the binary_file_format element, from the included file into the currently file then parse it all. Of course, the copying would be done in memory, not the actual file on disk.

If the above is too hard or not possible then you could include a single struct definition something like this:
CODE
<include type_name="STRUCT" file="some_stuff.xml"/>


I would really like to see this done as it would make a number of things a lot easier:
* Windows Icon format, which uses bitmap format for each image resource.
* Embedded ID3 tags in MP3 and other music files.
Offline
Top of Page Profile Contact Info 
 Post Number: 2
andrew Search for posts by this member.

Avatar



Group: Super Administrators
Posts: 635
Joined: Oct. 2003

Member Rating: 4
PostIcon Posted on: Jul. 24 2009,07:49 Skip to the previous post in this topic.  Ignore posts   QUOTE

I use the MSXML (DOM) parser to handle the XML for me so it is not that easy for me to do what you want.

However, I think XML already has an ability to "include" files, so you may already be able to do this with a simple edit of the XML file.  It may be possible for me to expose this in the template editing to make it easier for you.

Anyway I will look into this further.  I understand what you want but may have to tackle it a different way.


--------------
Andrew Phillips
Moderator of Forums and creator of Hex Edit
Offline
Top of Page Profile Contact Info WEB 
1 replies since Jul. 19 2009,16:26 < Next Oldest | Next Newest >

[ Track This Topic :: Email This Topic :: Print this topic ]


 
reply to topic new topic new poll

» Quick Reply Import definitions into template files
iB Code Buttons
You are posting as:

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code