我正在尝试使用C ++中的MSXML6 DOM解析器从XML文件中提取不同数据类型的信息组。 xml包含一组包含不同数据类型的非同类数据。我想按顺序格式检索信息集群的不同组。哪种容器最好呢?
这是xml文件:
<Activity ActivityType = "CENFsfIgpSurfaceActivity" ActivityVendor = "CENIT" Operation = "Operation.1" SimEventType = "CENITEvent" id = "_-18944736">
<ActivityName>Surface Activity.1</ActivityName>
<Relation>Unknown</Relation>
<Event>
<Syntax>C_VARPUT/JOG_MOTIONTYPE,R8,1</Syntax>
<Syntax>C_VARPUT/JOG_INTERPOLMODE,R8,0</Syntax>
<Syntax>C_VARPUT/JOG_SERIAL,R8,0</Syntax>
<Syntax>JOG/ -0.4125375, -1.6436356, 1.7844436, 4.2006409, 0.7993971, 0.5876199, 1.8000000</Syntax>
<Syntax>CONFIG/ 0</Syntax>
</Event>
</Activity>
<Activity ActivityType = "DNBRobotMotionActivity" ActivityVendor = "CENIT" Operation = "Operation.1" SimEventType = "IGRIPMove" id = "_-18944736">
<ActivityName>Surface Activity.1</ActivityName>
<Target Default = "Cartesian" ViaPoint = "false">
<BaseWRTWorld>
<Position Units = "m" X = "29.672426" Y = "0.5679999981" Z = "-0.776"/>
<Orientation Pitch = "0" Roll = "0" Units = "deg" Yaw = "-180"/>
</BaseWRTWorld>
<CartesianTarget>
<Position Units = "m" X = "-0.676426" Y = "-0.5004420167" Z = "1.046498163"/>
<Orientation Pitch = "0" Roll = "0" Units = "deg" Yaw = "92.98016434"/>
<Config Name = "Posture_1"/>
<Tag TrackTag = "false">Pt.15104</Tag>
</CartesianTarget>
<JointTarget>
<Joint DOFNumber = "1" JointName = "J1" JointType = "Rotational" Units = "deg">
<JointValue>-23.6367</JointValue>
</Joint>
<Joint DOFNumber = "2" JointName = "J2" JointType = "Rotational" Units = "deg">
<JointValue>-94.1734</JointValue>
</Joint>
<Joint DOFNumber = "3" JointName = "J3" JointType = "Rotational" Units = "deg">
<JointValue>102.2411</JointValue>
</Joint>
<Joint DOFNumber = "4" JointName = "J4" JointType = "Rotational" Units = "deg">
<JointValue>240.6790</JointValue>
</Joint>
<Joint DOFNumber = "5" JointName = "J5" JointType = "Rotational" Units = "deg">
<JointValue>45.8021</JointValue>
</Joint>
<Joint DOFNumber = "6" JointName = "J6" JointType = "Rotational" Units = "deg">
<JointValue>-326.3319</JointValue>
</Joint>
<AuxJoint DOFNumber = "7" JointName = "Command.1" JointType = "Translational" Type = "RailTrackGantry" Units = "m">
<JointValue>1.8</JointValue>
</AuxJoint>
</JointTarget>
</Target>
<MotionAttributes>
<MotionProfile>Default</MotionProfile>
<ToolProfile>End-Effector Spray Gun-Combo.1.Tool1</ToolProfile>
<AccuracyProfile>Default</AccuracyProfile>
<ObjectFrameProfile>Default</ObjectFrameProfile>
<MotionType>Linear</MotionType>
</MotionAttributes>
</Activity>
我试图按顺序将每个不同的活动收集到一个容器中。 CArray of Structs可以工作吗?