Jump to content
Sign in to follow this  
Gobinath

Read Data From Xml

Recommended Posts

<BackupSet>

<Name>07-02-2011_12-43-34</Name>

<OSVersion>Windows7</OSVersion>

<CreationTime>07/02/2011 12:44:06</CreationTime>

<DiskSize>40.0 GB</DiskSize>

<DiskUsedSize>40.0 GB</DiskUsedSize>

<BackupType>PARTITION_BACKUP</BackupType>

<CompressionType>NO_COMPRESSION</CompressionType>

<EncryptionType>NO_ENCRYPTION</EncryptionType>

<Comment></Comment>

<MaxNoOfIncrementals>600</MaxNoOfIncrementals>

<VolumeSet>G,I</VolumeSet>

<NoOfPartitions>2</NoOfPartitions>

<Partition>

<Name>G:\</Name>

<Index></Index>

<Size>20.0 GB</Size>

<UsedSpace>1.53 GB</UsedSpace>

</Partition>

<Partition>

<Name>I:\</Name>

<Index></Index>

<Size>19.99 GB</Size>

<UsedSpace>202.13 MB</UsedSpace>

</Partition>

</BackupSet>

here i m using this xml file how to read the name (which is bold) Exactly

and store in to variable

????????????

backupsetinfo1.xml

Share this post


Link to post
Share on other sites

#include <Array.au3>

$hXML = FileOpen(@ScriptDir & "\backupsetinfo1.xml")
If $hXML = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf
$sXML = FileRead($hXML)
FileClose($hXML)
$aRet = StringRegExp($sXML, '<Name>(.*?)</Name>', 3)
_ArrayDisplay($aRet)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...