B
BCC
Hi,
I am new to msxml, and am having a hard time figuring out how to get all
children of a particular node. For example, if I have something like this:
<?xml version="1.0" encoding="utf-8"?>
<rules>
<cell id="1">
<type>CD4 Cell</type>
<x>10</x>
<y>10</y>
<z>2</z>
<is_static>false</is_static>
</cell>
<cell id="2">
<type>CD4 Cell</type>
<x>10</x>
<y>10</y>
<z>4</z>
<is_static>false</is_static>
</cell>
<cell id="3">
<type>CD4 Cell</type>
<x>10</x>
<y>10</y>
<z>6</z>
<is_static>false</is_static>
</cell>
</rules>
I need to return a list of some sort that I can iterate through so I can
create a new 'cell' object for each cell in the list and initialize it in
the parameters given in the xml file (x, y, z, is_static, whatever). I can
read in the file okay, and have it stored as a CComPtr<IXMLDOMDocument2>
object (code I got from the web), but now Im at a loss as to how to parse it
and get what I need out.
Any suggestions, links or other helpful advice?
Thanks,
Bryan
I am new to msxml, and am having a hard time figuring out how to get all
children of a particular node. For example, if I have something like this:
<?xml version="1.0" encoding="utf-8"?>
<rules>
<cell id="1">
<type>CD4 Cell</type>
<x>10</x>
<y>10</y>
<z>2</z>
<is_static>false</is_static>
</cell>
<cell id="2">
<type>CD4 Cell</type>
<x>10</x>
<y>10</y>
<z>4</z>
<is_static>false</is_static>
</cell>
<cell id="3">
<type>CD4 Cell</type>
<x>10</x>
<y>10</y>
<z>6</z>
<is_static>false</is_static>
</cell>
</rules>
I need to return a list of some sort that I can iterate through so I can
create a new 'cell' object for each cell in the list and initialize it in
the parameters given in the xml file (x, y, z, is_static, whatever). I can
read in the file okay, and have it stored as a CComPtr<IXMLDOMDocument2>
object (code I got from the web), but now Im at a loss as to how to parse it
and get what I need out.
Any suggestions, links or other helpful advice?
Thanks,
Bryan