xboxscene.org forums

Author Topic: How Do I Get Single Tags In Xas Xml  (Read 313 times)

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How Do I Get Single Tags In Xas Xml
« on: February 09, 2004, 05:23:00 PM »

This is what I'm getting;
<audioplayer enabled="1" path="C:\xboxdash.xbe">
</audioplayer>

and this is what I want;
<audioplayer enabled="1" path="C:\xboxdash.xbe"/>
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How Do I Get Single Tags In Xas Xml
« Reply #1 on: February 09, 2004, 05:46:00 PM »

Well, there's not much that can be done about that at the moment.

It shouldn't affect anything.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How Do I Get Single Tags In Xas Xml
« Reply #2 on: February 10, 2004, 08:01:00 AM »

So avalaunch would still see them both the same? Cause that's what this is all about.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How Do I Get Single Tags In Xas Xml
« Reply #3 on: February 10, 2004, 08:13:00 AM »

QUOTE (flattspott @ Feb 10 2004, 01:01 PM)
So avalaunch would still see them both the same? Cause that's what this is all about.

It should.... but it depends on how they are parsing their XML.

I started with PD code that had a LOT of bugs, since fixed, and also put a lot of work into the tree access.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How Do I Get Single Tags In Xas Xml
« Reply #4 on: February 10, 2004, 08:20:00 AM »

Okay I' test it myself.

However I'm curious at to what the true arg does.

After looking at the internal.xml I saw you added that attr for the name (thanks for adding that btw). So that's what I used as an example for my newest script.

XMLSetValue avaXML !.network.setup "1" true gives me
<network setup="1">
</network>

Now what would it do if I left off the true arg or changed it to false?

Also another thing thing I'm wondering about is how this XML is made in relation to the XAS file. Cause in my script I have them one order then in the produced XML they are in another

XMLSetValue avaXML !.user.irc.font.name "framd" true
XMLSetValue avaXML !.user.irc.font.size "12" true
XMLSetValue avaXML !.user.irc.server irc.homelien.no
XMLSetValue avaXML !.user.irc.nick woo484
XMLSetValue avaXML !.user.irc.altnick _USER2_

Makes this below, with the fonr part at the bottom, even though i thought it was gonna be fisrt.

<irc>
<server>irc.homelien.no</server>
<nick>woo484</nick>
<altnick>_USER2_</altnick>
<font name="framd" size="12">
</font>
</irc>
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How Do I Get Single Tags In Xas Xml
« Reply #5 on: February 10, 2004, 08:29:00 AM »

And while I'm at it, how about an XMLComment command?
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
How Do I Get Single Tags In Xas Xml
« Reply #6 on: February 10, 2004, 09:21:00 AM »

QUOTE (flattspott @ Feb 10 2004, 01:29 PM)
And while I'm at it, how about an XMLComment command?

Well, to understand how XML works in MXM, you have to know that I track things in a "tree" - nodes are different from elements. When writing out the XML from this tree, elements are obviously (from your example) dumped first, then nodes. These are two distinct groups of items.

As for comments, it would require quite a bit of work for me to do that at the moment. Suffice it to say, I'd like to revisit the XML stuff at a later time and re-write some things, but I don't want to break anything, and currently, most of my energy is in getting the System UI stuff done for the next release.

As they say "if it ain't broke, don't fix it"  wink.gif  While I'd like to redo some aspects of the XML system, there's no pressing need (from MXM's perspective) at the moment to mess with it.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How Do I Get Single Tags In Xas Xml
« Reply #7 on: February 10, 2004, 09:58:00 AM »

smile.gif
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
How Do I Get Single Tags In Xas Xml
« Reply #8 on: February 10, 2004, 10:30:00 AM »

One more thing.

Damn, this XML/actionscript parsing or whatever is fast. It spits out an entirely new avalaunch.xml in less than a second.

Way to go
Logged