I have a flow that currently takes some xml and then using xslt splits it up and then depending on a certain value in one of the attributes it moves down different routes.
I would like to evaluate the xml first however im not sure if i could use xpath or will i have to use a script, although i am very much a beginner when it comes to scripting.
The XML looks like this:
Code: Select all
<?xml version="1.0"?>
<Root>
<IPN ID="11445" Name="Test">
<CustomerProducts CustomerProductName="1-1" ProductCount="3">
<Products ProductType="BOOK" ProductName="Cover" ProductNumber="1">
<ProductComponents Languages="ENG" PageCount="2">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
<Products ProductType="BOOK" ProductName="Inset" ProductNumber="2">
<ProductComponents Languages="ENG" PageCount="200">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
<Products ProductType="BOOK" ProductName="Wallet" ProductNumber="3">
<ProductComponents Languages="ENG" PageCount="0">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
</CustomerProducts>
<CustomerProducts CustomerProductName="1-2" ProductCount="3">
<Products ProductType="BOOK" ProductName="Cover" ProductNumber="1">
<ProductComponents Languages="ENG" PageCount="2">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
<Products ProductType="BOOK" ProductName="Inset" ProductNumber="2">
<ProductComponents Languages="ENG" PageCount="0">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
<Products ProductType="BOOK" ProductName="Wallet" ProductNumber="3">
<ProductComponents Languages="ENG" PageCount="0">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
</CustomerProducts>
<CustomerProducts CustomerProductName="1-3" ProductCount="3">
<Products ProductType="BOOK" ProductName="Cover" ProductNumber="1">
<ProductComponents Languages="ENG" PageCount="2">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
<Products ProductType="BOOK" ProductName="Inset" ProductNumber="2">
<ProductComponents Languages="ENG" PageCount="150">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
<Products ProductType="BOOK" ProductName="Wallet" ProductNumber="3">
<ProductComponents Languages="ENG" PageCount="0">
<ComponentSpecs SpecClass="" SpecType="" SpecValue="" />
</ProductComponents>
</Products>
</CustomerProducts>
</IPN>
</Root>
I need it to evaluate the XML by where PageCount="0" and ProductName is not ="Wallet". And if this is true i need it to take a different output route.
I hope this makes sense, any help appreciated.
Cheers