SwDocumentMgr API +XML Question

Sep 07, 2005 2 Replies

Folks,



Need some insight on the XML stream output from the SwDocumentMgr. The stream seems cryptic to me. I need to extract the assembly hierarchy from the XML output. It seems easy enought until you get to some multiple indents in the structure. I cannot easily find a childs assemblies parent when there is more then one level of indent. Anyone have some tips, plus my XML brain cells are somewhat rusty. If you have a parsing routine your willing to share that would be great!



Thanks,



Guy



XML Fox XML Notepad from MicroSoft

These might help see what is going on.

Hi, again

aaa, now it's all clear, u are using SWdmDocument::GetXMLStream method to obtain XML data. And u have problem reading it, when there a multiple level of assemblies.

The structure / logic of XML file (just for getting numbmer of level of subassebmlies):

swModelList contains ALL parts/assemblies, so u have swObjCount and swModel TABLE, in swModel u have row of data for, i repeat ALL referenced components!!! All u need to do is to filter out assemblies which have swReference data (form swModel TABLE) and each of assembly data row stores all config-specific properties. And what u need is ID number (first field of swReferecne TABLE) and match it with ID number from swModel TABLE. And that is all, one table and one ID...

H> Luka,

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required