Jump to content
Sign in to follow this  
frederf

Overloaded Squad.xml

Recommended Posts

I gave it a whack recently because 4IB's current setup is to have a separate squad.xml for each section allowing us to have different TAGs and different logos.

Unfortunately this meant 3 files, 3 links which was a pain to edit and required that anyone changing between sections would have to edit their profile for a new link.

No more. I put 3 squads on one file. Editing players into different squads is a snap, no member has to edit anything on their end.

Example.

Squad.xml<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><?xml version="1.0"?>

<?DOCTYPE squad SYSTEM "squad.dtd"?>

<?xml-stylesheet href="squad.xsl?" type="text/xsl"?>

<squad nick="HQS">

<name>Headquarters Section</name>

<email>webmaster@4thib.com</email>

<web>www.4thib.com</web>

<picture>HQS.paa</picture>

<title>4TH IN BDE</title>

<member id="0" nick="Mr. X">

<name>Mr. X</name>

<email></email>

<icq></icq>

<remark>Platoon leader. "Urban combat is fought with butter."</remark>

</member>

</squad>

<squad nick="1SQD">

<name>1st Squad</name>

<email>webmaster@4thib.com</email>

<web>www.4thib.com</web>

<picture>1SQD.paa</picture>

<title>4TH IN BDE</title>

<member id="0" nick="Mr. Y">

<name>Mr. Y</name>

<email></email>

<icq></icq>

<remark>Squad leader. "Yadamean?"</remark>

</squad>

<squad nick="2SQD">

<name>2nd Squad</name>

<email>webmaster@4thib.com</email>

<web>www.4thib.com</web>

<picture>2SQD.paa</picture>

<title>4TH IN BDE</title>

<member id="0" nick="Mr. Z">

<name>Mr. Z</name>

<email></email>

<icq></icq>

<remark>Alpha team leader. "He's just this guy, yaknow?"</remark>

</member>

</squad>

Share this post


Link to post
Share on other sites

Cool, maybe add this to the xml page in the wiki? smile_o.gif

Share this post


Link to post
Share on other sites

lol, it's funny how easy it is to miss very logical things... nice deduction.

Share this post


Link to post
Share on other sites

Testing seems to show that this does not actually work. We had people connecting and showing up as different XMLs to different people, it was completely unreliable.

If it sounds too good to be true... sad_o.gif

Share this post


Link to post
Share on other sites

My appologies for getting folks' hopes up. It worked somewhat for us but currently not now. Going to the three-file, three-link method.

Share this post


Link to post
Share on other sites

The <squad> tag is top-level, and valid xml cannot have more than one top-level. Not even of the same type.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×