Hi,
I trying to make a flexible config file using XML, but Im not sure how I should read it...
This is the way it looks:
There can be any (up to 10) number of IO:s and for each IO I need to create a SerialPort.
My Q is how I read a file with unknown number of IO:s?
Should I add an element that contains the number of IO:s?
XML is supposed to be so simple and flexible. I only find it confusing, what have I missed?!?
TIA
/Kejpa
I trying to make a flexible config file using XML, but Im not sure how I should read it...
This is the way it looks:
PHP:
<Settings>
<ComPorts>
<IO1>
<PortName>COM2</PortName>
<BaudRate>19200</BaudRate>
</IO1>
<IO2>
<PortName>COM4</PortName>
<BaudRate>4800</BaudRate>
</IO2>
</ComPorts>
</Settings>
My Q is how I read a file with unknown number of IO:s?
Should I add an element that contains the number of IO:s?
XML is supposed to be so simple and flexible. I only find it confusing, what have I missed?!?
TIA
/Kejpa