XML parsing

(Bogdan) #1

I will use the following XML document:

	<incident name="A">
			<record rule="foo"></record>
	<incident name="B">
			<record rule="bar" severity="severe"></record>
				<record rule="CPU" severity="severe" duration="3000"></record>
				<record rule="RAM" severity="warning" duration="2000"></record>

After parsing I expecting get the following:

{"incident":"B","rule":"bar", "severity":"severe"}
{"incident":"B","rule":"bar", "sub_rule":"CPU", "severity":"severe", "duration":"3000"}
{"incident":"B","rule":"bar", "sub_rule":"RAM", "severity":"warning", "duration":"2000"}

Please tell me how it's best done?

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.