Jump to content

What is XML?


Cetanu

Recommended Posts

So lets say I had a shopping list.

 

<xml _____ (the rest of the tag here)>

<listname>Shopping List</listname>

<list>

<item>Banana</item>

<item>Apples</item>

<item>Milk</item>

</list>

 

 

What would this look like in a browser? Just default text on a white background, right? Can't you style it or anything? I read that it's for displaying info.....but I'm still a little bit confused.

Link to comment
Share on other sites

Okay, now I've run into something I NEED to use XML for.  :wtf:

 

I am coding scripts for Windows Live Messenger Plus! and I need to create an XML file for a new window to be opened, but I don't know the first thing about XML, so I am trying to make a simple window and I figured I'd look over their examples....

 

...meh. Can someone break it down REALLY simple?

 
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">

<GlobalColors>
        <GlobalColor Id="green">
                <Red>80</Red>
                <Green>200</Green>
                <Blue>65</Blue>
                <Alpha>220</Alpha>
        </GlobalColor>

        <GlobalColor Id="bg">
                <BaseColor>
                        <Saturation>2</Saturation>
                        <Brightness>0.6</Brightness>
                        <Transparency>82</Transparency>
                </BaseColor>
        </GlobalColor>
</GlobalColors>


<Window Id="PersoStatus400" Version="1">
        <Attributes>
                <Caption>Personalized Status - Messenger Plus!</Caption>
        </Attributes>
        
        <TitleBar>        
                <Title>
                        <Prefix>Image</Prefix>
                        <Text>Personalized Status</Text>
                </Title>
        </TitleBar>
        
        <Position Width="286" Height="246"/>
        
        <DialogTmpl>
                <BottomBar Style="Plain">
                  <LeftControls>
                          <Control xsi:type="MenuButtonControl" Id="BtnPresets">
                                    <Position Top="0" Width="66" Left="0"/>
                                    <Attributes>
                                        <AlwaysDisplayBorder>true</AlwaysDisplayBorder>
                                    </Attributes>
                                    <Image Margin="4">
                                        <Name>icon-floppy</Name>
                                    </Image>
                                    <Caption>Pr&esets</Caption>
                                </Control>
                        </LeftControls>
        
                        <RightControls>
                          <Control xsi:type="ButtonControl" Id="BtnOk">
                                    <Position Top="0" Width="60" Left="0"/>
                                    <Attributes>
                                        <IsDefault>true</IsDefault>
                                    </Attributes>
                             <Caption>&Personalize</Caption>
                                </Control>
        
                                <Control xsi:type="ButtonControl" Id="BtnCancel">
                                    <Position Top="0" Width="60" Left="0"/>
                             <Caption>&Close</Caption>
                                </Control>
                        </RightControls>
                </BottomBar>
        </DialogTmpl>
        
        <Elements>
          <Element xsi:type="FigureElement" Id="FigRectOptions">
                        <Position Top="139" Left="5" Height="43" Width="263"/>
                        <Figure>
                                <RoundRect><Radius>3</Radius></RoundRect>
                        </Figure>

                        <Border>
                                <Color><GlobalColor>bg</GlobalColor></Color>
                        </Border>
        
                        <Fill>
                                <PlainColor>
                                        <Red>255</Red>
                                        <Green>255</Green>
                                        <Blue>255</Blue>
                                        <Alpha>120</Alpha>
                                </PlainColor>
                        </Fill>
                </Element>
        
                <Element xsi:type="ImageElement" Id="LblBusy">
                        <Position Top="162" Left="138"/>
                        <Image><Name>buddy-busy</Name></Image>
                </Element>
        
                <Element xsi:type="ImageElement" Id="LblAway">
                        <Position Top="162" Left="206"/>
                        <Image><Name>buddy-away</Name></Image>
                </Element>
        </Elements>
        
        <Controls>
                <Control xsi:type="StaticControl" Id="LblTop">
                        <Position Top="9" Width="254" Left="9" Height="20"/>
                        <Transparency>180</Transparency>
                        <Caption>Fill the fields below if you want to customize your status.
                                Your status will remain personalized until you change it
                                for something else.</Caption>
                </Control>
        
                <Control xsi:type="StaticControl" Id="LblNameTag">
                        <Position Top="36" Width="60" Left="9"/>
                        <Caption>Name tag:</Caption>
                </Control>
        
                <Control xsi:type="EditControl" Id="EdtNameTag">
                        <Position Top="35" Width="104" Left="80"/>
                </Control>
        
                <Control xsi:type="StaticControl" Id="LblPsm">
                        <Position Top="55" Width="70" Left="9"/>
                        <Caption>Personal message:</Caption>
                </Control>
        
                <Control xsi:type="EditControl" Id="EdtPsm">
                        <Position Top="54" Width="189" Left="80"/>
                </Control>
        
                <Control xsi:type="StaticControl" Id="LblResponder">
                        <Position Top="74" Width="70" Left="9"/>
                        <Caption>Auto-responder:</Caption>
                </Control>
        
                <Control xsi:type="EditControl" Id="EdtAutoMessage">
                        <Position Top="74" Width="189" Left="80" Height="38"/>
                        <Help>Tip: you can fully customize your auto-responder message by
                              creating a script.\nThen, all you need to do is call your
                              script function here with the /script command.\nYou can also
                              create a sequence of different messages by starting new lines
                              with #.</Help>
        
                        <Attributes>
                                <Multiline>true</Multiline>
                        </Attributes>
                </Control>
        
                <Control xsi:type="LinkControl" Id="LnkFilter">
                        <Position Top="113" Width="186" Left="80"/>
                        <Caption>Select the contacts who will receive the
                                message...</Caption>      
                </Control>

                <Control xsi:type="StaticControl" Id="LblMore">
                        <Position Top="128" Width="200" Height="12" Left="6"/>
                        <Color><GlobalColor>green</GlobalColor></Color>
                        <Font><Size>10</Size><Bold>true</Bold></Font>
                        <Caption>More options:</Caption>
                </Control>
        
                <Control xsi:type="CheckBoxControl" Id="ChkTime">
                        <Position Top="146" Width="125" Left="10"/>
                        <Help>Use the following tags in your auto-responder message to
                              refer to the remaining time:\n(!PS_R) (!PS_RH) (!PS_RM)
                              (!PS_RS)</Help>
                        <Caption>Automatically &reset my status:</Caption>
                </Control>
        
                <Control xsi:type="DateTimeControl" Id="DatTime">
                        <Position Top="160" Width="110" Left="10"/>
                        <Attributes>
                                <AllowCalendar>false</AllowCalendar>
                        </Attributes>
        
                        <Format><Custom>HH:mm:ss '(time remaining)'</Custom></Format>
                </Control>
        
                <Control xsi:type="StaticControl" Id="LblStatus">
                        <Position Top="146" Width="119" Left="138"/>
                        <Caption>Show me to my contacts as:</Caption>
         </Control>
        
                <Control xsi:type="RadioControl" Id="RadBusy">
                        <Position Top="163" Width="54" Left="151"/>
                        <Attributes>
                                <IsNewGroup>true</IsNewGroup>
                        </Attributes>
                        <Caption>&Busy</Caption>
                </Control>
        
                <Control xsi:type="RadioControl" Id="RadAway">
                        <Position Top="163" Width="49" Left="219"/>
                        <Caption>&Away</Caption>
                </Control>
        </Controls>
</Window>

</Interfaces>

 

 

Thanks.

Link to comment
Share on other sites

XML is a common way to format your information so that a program, like flash for example, can open up an xml file and read it. When the file is read into the flash progam, you can tell flash (using Actionscript) to display the xml or manipulate it.

 

Flash can also save variables in an xml file so that it can be accessed later.

 

Example:

 

You have a to write a letter. You type it up and then you want to save it to go get a cup of coffee.... Well, saving it writes that information to a file. The XML is just another file type that it can be saved as. So when you open the document later, it reads the letter your previously typed and displays it on the screen in your program.

 

XML is pretty cool for saving data and accessing it. Making a web page more dynamic.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.