15,899,124 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 g.bhangu (Top 7 by date)
g.bhangu
28-Jun-17 3:35am
View
Deleted
HI MACIEJ KINDLY DO THE REST FOR ME PLZ. MY SUBMISSION IS DUE, CNT TAKE CHANCE.
g.bhangu
28-Jun-17 2:10am
View
i have solved that problem thanks. another issue is :
https://www.codeproject.com/Questions/1193862/Compare-and-display-the-element-value-from-XML-fil
plz check.
g.bhangu
28-Jun-17 0:01am
View
this above file is resultant 33.xml file .
g.bhangu
27-Jun-17 23:54pm
View
Deleted
hi george, i am getting an xml comprises of two differnt xml, but it write the root element again, which is kinda break point.
kindly see my code:
using System.Xml.XPath;
namespace read_xml_elements
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
//its saving well but motepacket is closed so confuse the reader
XElement xFileRoot = XElement.Load("11.xml");
XElement xFileChild = XElement.Load("55.xml");
xFileRoot.Add(xFileChild);
xFileRoot.Save("33.xml");
//reading the file well
XElement _x = XElement.Load(@"33.xml");
var lightElements = from page in _x.Elements("ParsedDataElement") where page.Element("Name").Value == "light" select page; foreach (var item in lightElements)
{
listBox1.Items.Add(item.Element("ConvertedValue").Value);
}
}
}
}
and the ans file is :
<?xml version="1.0" encoding="utf-8"?>
<motepacket>
<parseddataelement>
<name>amtype
<convertedvalue>11
<motepacket> //i dnt want this break
<parseddataelement>
<name>amtype
<convertedvalue>11
kindly see and suggest.
g.bhangu
27-Jun-17 23:29pm
View
hi this is giving an exception: Data at the root level is invalid. Line 1, position 1.plz help. i have the same issue,that i want to add the elements but root node should be same. no break in it.
g.bhangu
26-Jun-17 19:37pm
View
Deleted
Could not find file 'C:\Users\admin\Desktop\read xml elements\read xml elements\bin\Debug\22.xml'. it means the file should be in debug folder right, but i am working with sensors the default location is C:\Memsic\cygwin\home\admin\ file name as : 22 so any other loading method plz . this working this way. but user cant load the file in debug folder all the times he run the user interface thats the limitaion so we have to read through the default location. any suggestions plz ??
g.bhangu
26-Jun-17 19:31pm
View
@George , i have tried that way and i knwo its working that way only but the problem is that i am unable to joint two xml files in one. so what i did is take load two xml in one by appending it. so at last when i open that newly saved file its also taking the root elements and declerations. so any idea how can joint two differnt xmls having same root and declearations in one, which just add the elements only?
Show More