15,905,563 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by kjohansen2000 (Top 9 by date)
kjohansen2000
30-Dec-21 6:40am
View
I got your reply on the original question:
"Sorry, i was busy. You have to use the same logic...
This: x.Parent.Attribute("Type").Value extracts "Type" atribute. To get "Number" attribute, use: x.Parent.Attribute("Number").Value
:)"
I don't know how to implement this, I actually tried it, but don't really understand the logic.. :(
kjohansen2000
30-Dec-21 5:15am
View
Thanks Maciej,
don't i have to change something in this, looking for "number" ?
Dim result = xdoc.Descendants("Property"). _
Where(Function(x) propTypes2find.Any(Function(a) x.Attribute("Type").Value=a) AndAlso _
deviceTypes2find.Any(Function(y) x.Parent.Attribute("Type").Value = y)). _
Select(Function(x) Tuple.Create(x.Parent.Attribute("Type").Value, x.Attribute("Type").Value, x.Value)). _
ToList()
kjohansen2000
20-Dec-21 18:07pm
View
Hi Maciej,
i still owe you that beer :)
One more question, if you are up to it?
<root>
<tree version="01.00" company="OTHER" stationnr="0111">
<device type="1">
<property type="1">111
<device type="2" number="1">
<property type="34">INT
<device type="3">
<device type="4" number="1">
<property type="56">192.168.242.192
<device type="29">
<property type="71">11016938
<device type="4" number="2">
<property type="56">192.168.242.193
<device type="29">
<property type="71">11016933
How do I extract the "Number" value in <device type="2" ...=""> ??
Kind regards
Kenneth
kjohansen2000
13-Aug-20 9:07am
View
Would it be possible to store it in data and calculate it by partition over etc.?
kjohansen2000
13-Aug-20 9:04am
View
I missed your comment, so sorry for the reply time.
Is the hard part possible? or am i in for another approach?
kjohansen2000
9-Apr-20 12:38pm
View
I owe you a large cold beer in the sun.. THANKS !!!
kjohansen2000
9-Apr-20 4:46am
View
Correct, i tried to limit the file to the needed, but maybe it just made it harder for me getting help.
Yes, other devices also has 56 and 71's
kjohansen2000
9-Apr-20 4:36am
View
Thank you very much, this takes me a very good part of the road and learned me something new!
The files i need to read are actually close to 10.000 rows and a lot of duplicated "type" numbers.
Can you give me a hint to read the file in a hierarchical way?
When reading the file as a human, i see that Device type 1 has a device type 2, and that has a device type 3, that has 2x device type 4. Those Device type 4, has their own type 56, but 56 is also a value in type 1, so i would like to see if the type 56 i read belongs to a type 4 or a type 1, does it make sense?
Sorry for not posting the full file.
kjohansen2000
18-Sep-19 4:32am
View
A conversion from integer to image :) if you read above that, i wrote what i intend.
My problem is to replace the cell content from an integer to an image depending on the value in the cell. I didnt write that it is in a datagridview, that i want to manipulate cells.
Show More