Jump to content
Sign in to follow this  
toxicdav3

xml values

Recommended Posts

toxicdav3

I got this xml file which i need to get the values out and into arrays and variables.

<program id='pad.exe' name='DrawPad'>
 <label id='Open' />
 <label id='Save' />
 <label id='Write' />
 <label id='Draw' />
 <label id='Exit' />
</program>

$label (array)

$exe

$name

I have tried using the XML DOM Wrapper but without success :) Any help would be appreciated!!!

Share this post


Link to post
Share on other sites
TheCuz

Post the code that you used so that we can see what you are doing....


[font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font]

Share this post


Link to post
Share on other sites
weaponx

You are missing some key components of your XML. Header, root node, and are is there more than one program node?

Header:

<?xml version="1.0" encoding="utf-8" ?>

Root node (??):

<programs>

<program>

<label id='Open' />

<label id='Save' />

<label id='Write' />

<label id='Draw' />

<label id='Exit' />

</program>

<program>

...

</program>

<program>

...

</program>

<programs>

Share this post


Link to post
Share on other sites
toxicdav3

There is no header, thats pretty much it. Its the exact same structure just i put in some example values and names. I don't know rly how to extract the values in autoit.

Edited by toxicdav3

Share this post


Link to post
Share on other sites
Will66

There is no header, thats pretty much it. Its the exact same structure just i put in some example values and names. I don't know rly how to extract the values in autoit.

xpath xpath examples

Edited by Will66

Share this post


Link to post
Share on other sites
toxicdav3

Can you guys help me out getting the label ids into a array, I don't completely know how xml works but i can't change it. I got the biggest headache and dun want to learn xml right now.

<program id='pad.exe' name='DrawPad'>
<label id='Open' />
<label id='Save' />
<label id='Write' />
<label id='Draw' />
<label id='Exit' />
</program>
Edited by toxicdav3

Share this post


Link to post
Share on other sites
Will66

Can you guys help me out getting the label ids into a array, I don't completely know how xml works but i can't change it. I got the biggest headache and dun want to learn xml right now.

<program id='pad.exe' name='DrawPad'>
<label id='Open' />
<label id='Save' />
<label id='Write' />
<label id='Draw' />
<label id='Exit' />
</program>
its not valid xml....try using FileOpen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

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.