Thanks for the pointers guys, I've also got a tame .NET developer on
the case so hopefully I'll be sorted shortly. I'll post my solution
back here on the off chance it's useful for anyone else.

Thanks again,
Dave.


On Jan 25, 11:56 pm, SeanJC <[email protected]> wrote:
> I agree with Cerebrus in that you could attached an XSL stylesheet to
> your XML and parse the results that way, you just then need to create
> the XSL parameters such as foreach and so on to bring out the results
> you want.
>
> You could also simply load the XML file into reader object such as the
> XMLTextReader and that will then give you your xml as a data island
> (XML speak) or kinda like a dataset, you can then loop through this
> using the Read() method, do a check for IsStartElement() then check
> for the Name property and when it matches what you want, use the
> ReadString() method to pull out the stuff you want.
>
> Hope this helps, just a slight word of caution if you decide to use a
> stylesheet use XSL properties and not XSLT properties as they are
> slightly different and one is intended to transform an output (XSLT)
> and one is intended to transform data (XSL).
>
> Happy Coding
> Sean
>
> On Jan 25, 8:53 am, Cerebrus <[email protected]> wrote:
>
>
>
> > Hmmm... okay. Maybe I should have been more descriptive considering
> > your earlier statement "I'm not massively familiar with the
> > intricacies of XML or the
> > facilities available in .NET to process it".  ;-)
>
> > Well, you can bring about a transformation using C# code. There is no
> > requirement to include a stylesheet element within the XML itself.
> > Since this happens silently in code, the user never comes to know how
> > the XML has been transformed.
>
> > When I say "parameter", I mean XSL parameter. Again this is passed to
> > the XSLCompiledTransform object via the XsltArgumentList parameter.
>
> > On Jan 25, 5:36 am, Knickerless Parsons
>
> > <[email protected]> wrote:
> > > Thanks for the response,
> > > As long as the solution is as simple to use from the users view, I
> > > don't mind how it's implemented. When you say a parameter, are we
> > > talking command line stuff or could we use an application like MS XML
> > > Notepad? There's an XSLT tab I noticed but to get anything out of it I
> > > needed to add a reference to the stylesheet into the source document
> > > which the users aren't going to be happy with.
>
> > > The other things I should have mentioned were:
>
> > > * I'm rolling this out to locked down desktops so the scope for
> > > installing new applications is going to be restricted
> > > * I don't know if the result file is processed using XML aware code or
> > > just plain old file processing so I don't want any additional tags
> > > appending to the header of the document.
>
> > > Ta,
> > > Dave.
>
> > > On Jan 24, 11:49 am, Cerebrus <[email protected]> wrote:
>
> > > > What you are trying to achieve is in effect nothing more than a
> > > > transformation of a master XML into a filtered version. For this
> > > > purpose, an XSLT would be the best method, IMHO. The XSLT will accept
> > > > the filter criterion as parameter and return a filtered output.- Hide 
> > > > quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

Reply via email to