Jump to content


Photo

Xml Includes


  • Please log in to reply
10 replies to this topic

#1 Splice

Splice

    X-S Young Member

  • Members
  • Pip
  • 44 posts

Posted 15 April 2004 - 02:29 AM

I've been looking around and I don't think this is even part of XML yet, but is there a way to include a seperate file as part of the menu.xml?

I'm working on an actionscript that sort of works like the recent file list in windows. At the moment, it directly edits the menu.xml file, and seems to work fine that way. However, I'd rather have it edit it's own file, say recent.xml, and then have that file parsed as part of the menu.xml (just in case it somehow hoses the file, it'll just mess up the recent list, not the whole menu.xml).

What I'm looking for would be similar to "<?php include("file.ext"); ?>" in php.

Any way to do this, and if not, could it be concidered for a future version? smile.gif

Thanks.

#2 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 15 April 2004 - 02:59 AM

you just want to run a script from the menu? or you want the menu edited and update realtime?

if its the later, its not going to happen since (just like evox, ava etc) the menus are loaded on boot and not reloaded. You would have to reboot to reflect any changes.




#3 chilin_dude

chilin_dude

    X-S Knowledgebase

  • Members
  • PipPipPipPipPipPipPipPip
  • 4,945 posts
  • Location:USA
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 15 April 2004 - 05:42 AM

QUOTE (koldfuzion @ Apr 15 2004, 04:59 AM)
you just want to run a script from the menu? or you want the menu edited and update realtime?

if its the later, its not going to happen since (just like evox, ava etc) the menus are loaded on boot and not reloaded. You would have to reboot to reflect any changes.

I know exactly what he's doing, just what I wanted to do at one point:

Record what game/app is launched into say recent.xml which will look like this:

<Itemlaunched>boxplorer</Itemlaunched>
<timeoflaunch>5:53pm</timeoflaunch>

etc.
He then wants his menu to scan the recent.xml and add the last 10 things to the menu, so each time he boots he can see the last ten things he booted.

I would like to see this progres!

#4 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 15 April 2004 - 05:48 AM

The future version has pretty much everything needed for the recent items list.

Except maybe ability to add items to the menu on the fly.

#5 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 15 April 2004 - 08:31 AM

Try this. On F: put a folder called RECENT. And like 10 Sub folders in that. Now have a script make MXM_entry.xmls and put then in those folders as you need to. Then put an AutoDir F:\Recent tag in your Menu.xml. You might need to be sure to include the stuff like ID though so it doesn't try to get them when there's no XBE files in the RECENT folder

#6 Splice

Splice

    X-S Young Member

  • Members
  • Pip
  • 44 posts

Posted 17 April 2004 - 02:32 AM

Reloading the menu.xml while MXM is running is not needed. The way I have the script now, when you launch a game, it first edits the menu.xml file to reflect that this game has been launched recently, then it actually launches the game. When you've finished playing, you reboot to MXM and it loads up the modified menu.xml.

What I'm trying to avoid is the possibility of the script failing and corrupting the entire menu.xml. I'd like the script to instead edit a secondary xml file, which would then be "included" in the menu.xml. Something like the following...

CODE
Menu.xml

<item>
 <title>Game 1</title>
 ...
</item>

<item>
 <title>Game 2</title>
 ...
</item>

<includeXML>recent.xml</includeXML>


CODE
Recent.xml

<item>
 <title>Recent 1</title>
 ...
</item>

<item>
 <title>Recent 2</title>
 ...
</item>


... which would end up with a menu in MXM looking like

Game 1
Game 2
Recent 1
Recent 2

----------------------------------------

flatspot,

I haven't really used mxm_entry.xml files myself, so I don't know much about them without looking it all up tongue.gif Would this allow MXM to autodir that recent folder without actually copying the xbe and supporting files into said folder?

Edited by Splice, 17 April 2004 - 02:37 AM.


#7 chilin_dude

chilin_dude

    X-S Knowledgebase

  • Members
  • PipPipPipPipPipPipPipPip
  • 4,945 posts
  • Location:USA
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 17 April 2004 - 06:45 AM

Why not just edit the cache.xml??? That way the menu.xml is always fine!

#8 Splice

Splice

    X-S Young Member

  • Members
  • Pip
  • 44 posts

Posted 17 April 2004 - 01:22 PM

QUOTE (chilin_dude @ Apr 17 2004, 12:45 AM)
Why not just edit the cache.xml??? That way the menu.xml is always fine!

Well, for myself that would be fine, seeing as I don't really use the cache at all. But if you do use the cache as intended (with autodir entries and such), you'de loose your recent list every time you add a new game (since you have to clear the cache). Not the end of the world, but a potential frustration smile.gif

#9 chilin_dude

chilin_dude

    X-S Knowledgebase

  • Members
  • PipPipPipPipPipPipPipPip
  • 4,945 posts
  • Location:USA
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 17 April 2004 - 01:31 PM

QUOTE (Splice @ Apr 17 2004, 03:22 PM)
Well, for myself that would be fine, seeing as I don't really use the cache at all. But if you do use the cache as intended (with autodir entries and such), you'de loose your recent list every time you add a new game (since you have to clear the cache). Not the end of the world, but a potential frustration smile.gif

True, I hadn't thought of that as I don't use autodir laugh.gif
But it wouldn't be too much of a big deal would it? Maybe you could get it to record the list in cache.xml AND in recent.xml.
So if you had to rebuild your cache.xml it could cut and paste from recent.xml by using a seperate script???

#10 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 17 April 2004 - 04:40 PM

How abot something like so.

OpenRead MenuXML ::Menu
OpenRead RecentXML $ActualPath$\recent.xml
OpenWrite NewMenuXML $ActualPath$\newMenu.xml

Then you'd have a loop to read each line of the original Menu.xml and write it out the the new one. Then you do the recent one. Basically you'd be appending the the rencent one to the menu. Then do a remane Menu.xml to Menu.xml.bak and newMenu.xml to Menu.xml

#11 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 17 April 2004 - 07:33 PM

if you used x-select it would be even easier,

you write out the button preference so when you boot up - or reboot, you can start the last used app/game with a touch of a button and not even load mxm





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users