Designing A Slightly Different Application, Need Some Advice...

Hi folks,

I am currently trying to build a system that parses complex XML. The parser is actually already built, and functions thusly…

  1. The XML is read via DOMDocument->DOMXpath

  2. As the XML is traversed, the parser drills down to the children of the root node. It grabs the text from there using nodeValue.

  3. The parser then checks for the presence of the nodeValue in a numerical array (non-associative) which the parser created from a DB table column using standard SQL and PHP foreach.

  4. If the nodeValue is indeed present in the array, it proceeds to drill down further into that node to parse the required information.

Now, I am in the process of moving this all over into the Yii application I have created, and I need advice on how to do this. So, some quickfire questions: -

  1. Should the parser itself be a Yii application component?

  2. I have modelled the table the numerical array is taken from. How is it best to create an array from this for checking the presence of the nodeValue?

BTW this is going to be run at least in the meantime via WebApplication, not the Console. So I have that thought through in case anyone was going to mention it.

Any help greatly appreciated!

Thanks,

U4EA