Consuming and Manipulating Data

Posted on
Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

70-305 – Developing and Implementing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET

 

Objective: Consuming and Manipulating Data
SubObjective: Access and manipulate data from a data store. Data stores include relational databases, XML documents and flat files. Methods include XML techniques and ADO.NET.

 

Item Number: 70-305.3.2.2
Single Answer, Multiple Choice

 

In code, you have an XmlDataDocument object populated with a complex XML document. You
need to transform this XML document with an XSLT stylesheet to meet the requirements of a
partner organization that will retrieve this XML through a Web service. The XLST style sheet
already exists as a file on your file system.

 

Which method would be the most effective way to transform your XML document?

 

 

  1. Call the Transform method of the XslTransform object.
  2. Call the TransformXml method of the XslTransform object.
  3. Call the Transform method of the XmlDataDocument object.
  4. Read the XSLT into the XmlDataDocument object and save the results back to a file.

 

Answer:
A. Call the Transform method of the XslTransform object.

 

Tutorial:
The most efficient approach would be to call the Transform method of the XslTransform object. This method uses an XSLT stylesheet to transform XML data into another form of output. You can use this method to transform XML into HTML.

 

You should not call the TransformXml method of the XslTransform object because the XslTransform object does not expose a TransformXml method. You should use the Transform method instead.

 

You should not call the Transform method of the XmlDataDocument object because the XmlDataDocument class does not expose a Transform method.

 

You should not read the XSLT into the XmlDataDocument object and save the results back to a file. This is not a valid method of transforming XML data.

 

Reference:
1. MSDN Library Visual Studio .NET – Search
– .NET Framework Class Library – XslTransform Class

 

2. MSDN Library Visual Studio .NET – Search
– .NET Framework Developer’s Guide – XSLT Transformations with the XslTransform Class

 

3. MSDN Library Visual Studio .NET – Search

– .NET Framework Class Library – XslTransform.Transform Method

 

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: