What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Enumerating XML nodes...

[Help] Enumerating XML nodes...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. Huh?  [Help] Enumerating XML nodes...
Okay, here's a sample window, written through my Interface Writer.
xml code:
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">

<!-- Written using Interface Writer 2.2 by WhizWeb Community -->

<Window Id="WndTest" Version="1">

    <Attributes>
        <Caption>Test Window</Caption>
    </Attributes>

    <TitleBar>
        <AllowMaximize>true</AllowMaximize>
        <Title>
            <Prefix>Image</Prefix>
            <Text>Test Window</Text>
        </Title>
    </TitleBar>

    <Position Width="400" Height="300" InitialPos="Random">
        <IsAbsolute>true</IsAbsolute>
        <Resizeable Allowed="BothSides">
            <MinWidth>400</MinWidth>
            <MinHeight>300</MinHeight>
        </Resizeable>
    </Position>

    <WindowTmpl/>

    <Controls>
        <Control xsi:type="RichEditControl" Id="EdtMain">
            <Position Left="3" Top="0" Width="380" Height="223">
                <Units>AllPixels</Units>
                <Anchor Horizontal="LeftRightFixed" Vertical="TopBottomFixed"/>
            </Position>
        </Control>
        <Control xsi:type="ButtonControl" Id="BtnOk">
            <Position Left="3" Top="228" Width="100">
                <Units>AllPixels</Units>
                <Anchor Vertical="BottomFixed"/>
            </Position>
            <Image>
                <Name>sounds-check</Name>
            </Image>
            <Caption>&amp;Ok</Caption>
        </Control>
        <Control xsi:type="ButtonControl" Id="BtnCancel">
            <Position Left="283" Top="228" Width="100">
                <Units>AllPixels</Units>
                <Anchor Horizontal="RightFixed" Vertical="BottomFixed"/>
            </Position>
            <Image>
                <Name>icon-delete</Name>
            </Image>
            <Caption>&amp;Cancel</Caption>
        </Control>
    </Controls>

</Window>

</Interfaces>
I don't know if it's possible, but what I would like to do is enumerate the nodes within Interface/Window/Controls/Control.  For the ones that aren't supported directly (i.e. not position, caption or help), I would like to be able to grab the code.  For example, say I have a variable called ControlExtra.
xml code:
<Control xsi:type="ButtonControl" Id="BtnOk">
    <Position Left="3" Top="228" Width="100">
        <Units>AllPixels</Units>
        <Anchor Vertical="BottomFixed"/>
    </Position>
>>>    <Image><<<
>>>        <Name>sounds-check</Name><<<
>>>    </Image><<<
    <Caption>&amp;Ok</Caption>
</Control>
I need the script to find the highlighted lines, because they're not recognized elements.  I then need the variable to store all of the code (including nodes), like this below.
code:
<Image>
    <Name>sounds-check</Name>
</Image>
Is this possible?
11-16-2009 07:14 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Enumerating XML nodes... - by whiz on 11-16-2009 at 07:14 PM
RE: [Help] Enumerating XML nodes... - by matty on 11-16-2009 at 07:27 PM
RE: [Help] Enumerating XML nodes... - by whiz on 11-16-2009 at 07:36 PM
RE: [Help] Enumerating XML nodes... - by Matti on 11-17-2009 at 06:42 PM
RE: [Help] Enumerating XML nodes... - by matty on 11-17-2009 at 07:08 PM
RE: [Help] Enumerating XML nodes... - by whiz on 11-18-2009 at 03:22 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On