Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


XML in VB 2008

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Euzinho Dassilva
Advanced Cheater
Reputation: 0

Joined: 08 Sep 2007
Posts: 62

PostPosted: Wed Oct 10, 2007 6:18 am    Post subject: XML in VB 2008 Reply with quote

Hi (again again ^^)

My problem with dynamic combobox was resolved, now I would like to know how can I insert and read a XML file with VB 2008

I would like to make a structure to my Trainer:

Code:
<shop>
<ID>1</ID>
<name>Yulgar's Shop</name>

<ID>2</ID>
<name>The Inn Shop</name>

(...)

</shop>


Why? Because the VB method to add items in a combobox is horrible. All in a unique line.

Code:
Dim Falconreach As Object() = New Object() {"Yulgar's Shop", "The Inn Shop"}


And, I don't know how can I would load the shop ID, because the Object stores Strings.

Then, a XML file is a better option.

But, I don't know where I can save the XML file. Together the .vb files? In the /bin/Release folder? Or in a custom folder readable after compile trainer?

An, of course, I need to learn to manipulate XML DOM Nodes with Visual Basic (it's some different that JavaScript, PHP...)

Anyone experient desktop programmer can help me?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 204

Joined: 25 Jan 2006
Posts: 8580
Location: 127.0.0.1

PostPosted: Wed Oct 10, 2007 6:42 am    Post subject: Reply with quote

Check this article out. Not sure how much use it will be though, I don't touch .NET Mad

http://msdn2.microsoft.com/en-us/library/bb687701.aspx
Back to top
View user's profile Send private message Visit poster's website
Euzinho Dassilva
Advanced Cheater
Reputation: 0

Joined: 08 Sep 2007
Posts: 62

PostPosted: Wed Oct 10, 2007 11:57 am    Post subject: Reply with quote

No, this article isn't useful (not for me).

I only need a XML Reader to read (duh) content of XML's and show in fields

[EDIT]

I don't found a solution, but found this:

Code:
        Dim Falconreach As XmlReader = XmlReader.Create(My.Computer.FileSystem.CurrentDirectory & "\XML\Shop\Falconreach\NormalShop.xml")

        If Me.listTowns.SelectedItem = "Falconreach" Then
            Me.listNormalShops.Text = ""
            While Falconreach.Read
                If Falconreach.NodeType = XmlNodeType.Element Then
                    xmlContent.Text &= Falconreach.Name
                End If
            End While
            Falconreach.Close()
        End If

My test XML structure is:

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

   <ID>1</ID>
   <name>Yulgar's Shop</name>

   <ID>2</ID>
   <name>The Inn Shop</name>

</Shop>

This sub returns, in a textfield:

Code:
ShopIDnameIDname

If I replace Falconreach.Name by/for Falconreach.ReadString returns:

Code:


   Yulgar's Shop2The Inn Shop

** Including the initial space

Anyone can help me to make a new sub to show only the string of tag <name>?

The MSDN help is sucks

[EDIT 2]

THIS problem was solved with XPath. When I can, I post complete solution
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites