Hi, I am an engineering student seeking some advice, since my programming experience is very limited.
Task to be done:
I have to create xml files to be used in a robot simulation program (DELMIA). These files contain data of the tasks the robots must carry out, e.g. names of parts to be grabbed, x,y,z positions to move to etc.
This should be done automatically, based on data from an external source not determined yet, but I am thinking database, excel or .csv.
Several files would have to be created every day, so minimal human interaction is preferable.
The xml file can vary depending on e.g. the number of tasks the robot must run through. So an element and sub-elements in the xml file can occur several times with different attribute values for each instance. (One xml file might tell the robot to pick and place 3 parts and then weld them)
I have a xsd file at my disposal. (attached as txt file)
Question:
I have been searching the net the last couple of days, and have come across a few possibilities. I would like some advice on which would be the easiest and best for the task at hand, if they can do the job at all, or if there is something better around?
1) xsd.exe and serialization
- creating a class file from the xsd and using it to piece together a custom xml file in some way.
The info I have on these two seems mainly to be about changing existing xml files and creating xml files by hand. But I could easily be wrong
2) XPath
3) LINQ to XML
I hope you have some insight on what direction is the easiest for me to continue?
Thanks for the response.
I am not exactly sure about what you mean when you say property.
I thought e.g. id was one of the attributes of ResourceType.
Anyway, does this mean that I would have to edit the class file manually, or is what I am trying to do unfeasible?
Code:
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute(DataType="NMTOKEN")]
public string id {
get {
return this.idField;
}
set {
this.idField = value;
}
}
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.