TheBlackGamer

Copy Tags From Xml

10 posts in this topic

I have a Xml FIle Contains alot of Tags And i want to Copy or Take Certain Tags any Thoughts :D ?! 

Share this post


Link to post
Share on other sites



TheBlackGamer,

Many thoughts - but not at all sure which ones might be of use to you. How about a copy of the XML file and some details of the tags you wish to extract. Then we might be able to offer some sensible advice.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

i want to make alist of The games That each User has in Steam :D

Here is The xml File Of A User 

http://steamcommunity.com/id/CptYakuza/games?tab=all&xml=1

 

i want to copy the line Between The Appid 

 

<gamesList>
<steamID64>76561198078412927</steamID64>
<steamID>
<![CDATA[ Yakuza ]]>
</steamID>
<games>
<game>
<appID>374320</appID>
<name>
<![CDATA[ DARK SOULS III ]]>
</name>
<logo>
<![CDATA[
http://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/374320/54f76fd3abdd1446260f28ccc0cbc76034b32de9.jpg
]]>
</logo>

Then Replace This Number By Its Name From here 

http://api.steampowered.com/ISteamApps/GetAppList/v0001/

 

Share this post


Link to post
Share on other sites

Hello. You can do something like this.

 

#include <InetConstants.au3>
#include <StringConstants.au3>
#include <Array.au3>


Local $sGameXML = BinaryToString(InetRead("http://steamcommunity.com/id/CptYakuza/games?tab=all&xml=1", $INET_FORCERELOAD), $SB_UTF8)
Local $sGAppList = BinaryToString(InetRead("http://api.steampowered.com/ISteamApps/GetAppList/v0001/", $INET_FORCERELOAD), $SB_UTF8)
;~ ConsoleWrite($sGameXML & @CRLF)
;~ ConsoleWrite($sGAppList & @CRLF)

Local $aGameAppIDs = StringRegExp($sGameXML, '<appID>(.*?)</appID>', $STR_REGEXPARRAYGLOBALMATCH)
;~ _ArrayDisplay($aGameAppIDs)

$sGAppList = StringReplace($sGAppList, '"', "")
Local $aAppList = StringRegExp($sGAppList, '(?:appid|name):([^\{,}]+)', $STR_REGEXPARRAYGLOBALMATCH)
;~ _ArrayDisplay($aAppList)


Local $aResult[UBound($aGameAppIDs)][2]
Local $iIndexFound = -1
Local $iIndex = 0

For $i = 0 To UBound($aAppList) - 1 Step 2
    ConsoleWrite($aAppList[$i] & @CRLF)
    $iIndexFound = _ArraySearch($aGameAppIDs, StringReplace($aAppList[$i], " ", ""))
    If $iIndexFound > -1 Then
;~      ConsoleWrite($iIndexFound & @CRLF)
        $aResult[$iIndex][0] = $aGameAppIDs[$iIndexFound]
        $aResult[$iIndex][1] = $aAppList[$i + 1]
        $iIndex += 1
    EndIf

Next

_ArrayDisplay($aResult)

Saludos

Share this post


Link to post
Share on other sites
41 minutes ago, Danyfirex said:

Hello. You can do something like this.

 

#include <InetConstants.au3>
#include <StringConstants.au3>
#include <Array.au3>


Local $sGameXML = BinaryToString(InetRead("http://steamcommunity.com/id/CptYakuza/games?tab=all&xml=1", $INET_FORCERELOAD), $SB_UTF8)
Local $sGAppList = BinaryToString(InetRead("http://api.steampowered.com/ISteamApps/GetAppList/v0001/", $INET_FORCERELOAD), $SB_UTF8)
;~ ConsoleWrite($sGameXML & @CRLF)
;~ ConsoleWrite($sGAppList & @CRLF)

Local $aGameAppIDs = StringRegExp($sGameXML, '<appID>(.*?)</appID>', $STR_REGEXPARRAYGLOBALMATCH)
;~ _ArrayDisplay($aGameAppIDs)

$sGAppList = StringReplace($sGAppList, '"', "")
Local $aAppList = StringRegExp($sGAppList, '(?:appid|name):([^\{,}]+)', $STR_REGEXPARRAYGLOBALMATCH)
;~ _ArrayDisplay($aAppList)


Local $aResult[UBound($aGameAppIDs)][2]
Local $iIndexFound = -1
Local $iIndex = 0

For $i = 0 To UBound($aAppList) - 1 Step 2
    ConsoleWrite($aAppList[$i] & @CRLF)
    $iIndexFound = _ArraySearch($aGameAppIDs, StringReplace($aAppList[$i], " ", ""))
    If $iIndexFound > -1 Then
;~      ConsoleWrite($iIndexFound & @CRLF)
        $aResult[$iIndex][0] = $aGameAppIDs[$iIndexFound]
        $aResult[$iIndex][1] = $aAppList[$i + 1]
        $iIndex += 1
    EndIf

Next

_ArrayDisplay($aResult)

Saludos

It didnt work i was Thinking To Search For Each <appId> And Copy The Number and paste it in Text then change each no. with its Value or Name ?! 

Share this post


Link to post
Share on other sites

 

you can modify my example to meet your needs. It is not strictly what you need, but it is a way to achieve it.

 

Saludos

Share this post


Link to post
Share on other sites
5 hours ago, TheBlackGamer said:

i want to make alist of The games That each User has in Steam :D

i don't think Steam is telling that you for all users

Share this post


Link to post
Share on other sites
3 hours ago, AutoBert said:

i don't think Steam is telling that you for all users

Not all The Users ... The Public Ones Only ! 

 

Share this post


Link to post
Share on other sites

TheBlackGamer,

While I am happy to let this thread run, both the subject and your username suggest you should read the Forum rules pretty soon so you are quite clear on what is and is not allowed to be discussed here.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

its a username i choose about 2-3 Years Ago ..  and The Thread is About a program iam useing to make A survey on which the Most Bought / purchased Game with Steam Users  it Doesnt iNclude Hacking or thing Besides Steam  Already Let The Game Shown to Everyone  Iam Just Takeing Some Text From a An Opened Page :D

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