I'm trying to construct an XPath and it is giving me trouble. I have
an XML that contains a "Routine". The routine contains "Steps". The
steps have different types. Some types of steps have more steps
contained within them (substeps). I want to get a list of all of the
steps in a routine, including any substeps...but excluding substeps
that occur in a particular type of step ("Subroutine ").
Below is a simplified example XML. The query I envision would return
all of the steps in the routine, including substeps found in the
"Loop" step type and "Condition" step type...but NOT including any
steps that are anywhere within a "Subroutine " step.
Any thoughts? My sincerest thanks in advance!
-----
<Routine>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</Steps>
</Step>
</Steps>
</Step>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Condition </Type>
<TrueSteps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</Steps>
</Step>
</TrueSteps>
<FalseSteps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</FalseSteps>
</Step>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Subroutin e</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</Steps>
</Step>
</Steps>
</Step>
</Steps>
</Routine>
an XML that contains a "Routine". The routine contains "Steps". The
steps have different types. Some types of steps have more steps
contained within them (substeps). I want to get a list of all of the
steps in a routine, including any substeps...but excluding substeps
that occur in a particular type of step ("Subroutine ").
Below is a simplified example XML. The query I envision would return
all of the steps in the routine, including substeps found in the
"Loop" step type and "Condition" step type...but NOT including any
steps that are anywhere within a "Subroutine " step.
Any thoughts? My sincerest thanks in advance!
-----
<Routine>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</Steps>
</Step>
</Steps>
</Step>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Condition </Type>
<TrueSteps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</Steps>
</Step>
</TrueSteps>
<FalseSteps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</FalseSteps>
</Step>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Subroutin e</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
<Step>
<Type>Loop</Type>
<Steps>
<Step>
<Type>Calculati on</Type>
<Other>stuff</Other>
</Step>
</Steps>
</Step>
</Steps>
</Step>
</Steps>
</Routine>
Comment