BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

 
WSE
SOA
XML

 
 
Buzz index BUZZ INDEX : -net-xml-system-xml
 
Buzz index

.NET XML, System.XML

Learn about .NET System.XML and System.Web.Services here...
Tags found in the posts on this page : System.XML Search for System.XML on Wikipedia.Search for System.XML on Technorati | System.Web.Services Search for System.Web.Services on Wikipedia.Search for System.Web.Services on Technorati | XmlReader Search for XmlReader on Wikipedia.Search for XmlReader on Technorati | XmlWriter Search for XmlWriter on Wikipedia.Search for XmlWriter on Technorati
Page 1 of 4

2008 Jun 05

1 of 178 | Setting .NET breakpoints in Windbg for applications that crash on startup - I recently received a question from a reader who wanted to know how to set breakpoints in code for applications that crash on startup. The email went like this: I have a .NET app which is crashing upon startup (it even causes DW20.exe to make an appearance). When I open the .NET app in Windbg, I can see exactly what the exception is and where it happens. What I would like to do is put a breakpoint on the method where the exception is being raised so that I can step through it. This is where I'm stuck. I'm familiar with commands such as !name2ee and !bpmd., however, when I load the .NET app, I don't get a chance to set the breakpoint since the exception happens so early in startup......

2008 Jun 04

2 of 178 | Writing to .Net Config Files - I've been working with config files for quite some time.  I was recently reminded that I needed to finish my original article and share my final findings on my personal best practices for working with config files. One of the coolest and most useful features in config files is the file attribute as displayed below (see my other article for a more detailed explaination, preferred-method-for-read-only-config-files). <configuration>   <configSections>     <section name="MyCustomSection" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>   </configSections>   ......

2008 May 04

3 of 178 | MOSS : How to pass the FBA authenticated user to a PageViewer Web Part? - f you creates a Form based authenticated site and you were not able to get the authenticated login user token at client site. You can user the following resolution when you are working with PageViwer Web Part. using System; using System.Runtime.InteropServices; using System.Web.UI; using System.Web.UI.WebControls.WebParts; using System.Xml.Serialization; using System.Xml; using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using Microsoft.SharePoint.WebPartPages; using System.ComponentModel; namespace FBALoginUser { [Guid("2ea076de-3536-4d20-b5d2-365dfd098da6")]   public class FBALoginUser : System.Web.UI.WebControls.WebParts.WebPart { public FBALogin......

2008 May 03

4 of 178 | A quick walk-through of CLR Integration with SQL Server - This blog post is inspired by a project I've been working on recently. One of the project requirements is writing all the stored procedures and user-defined functions in CLR integration. Although I don't intent to give you the overview of CLR integration in this article, it's not a bad idea to go over the benefits you get from using CLR integration. Stored procedures and user-defined functions/types/aggregates authored in managed code compiles into native code prior to execution, and you can achieve significant performance increases in scenarios where complex computations or business logics are involved. When you create these CLR objects, you can leverage various functions and services CLR ......

2008 Apr 15

5 of 178 | I have a dream! C# Code Completion in Emacs (csense, dabbrev, etc) - No good options here. I know, dabbrev does some neat things. But it pales in comparison to real code completion as you get in Visual Studio, or, I think, even SharpDevelop. I checked out a module called csense that a lone developer hacked together last year. The goal of the project looked simple, focused, valuable: real code completion in Emacs for C# !!! Whoohoo!!!!! but The implementation looks incomplete  There are no docs  I couldn't even figure out how to initially install it nobody is using it; there were 33 downloads and I think I was about 8 of them. I couldn't figure out how to configure it or what the various vars did, without wading in knee deep in......

2008 Mar 13

6 of 178 | Email router doesn't start (Microsoft.Crm.Tools.EmailAgent.SystemState.xml is empty) - Suddenly my email router stopped working in my VPC. A look in the event viewer showed #16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.Configuration.ConfigurationErrorsException: The E-mail router service cannot access system state file Microsoft.Crm.Tools.EmailAgent.SystemState.xml. The file may be missing or may not be accessible. The E-mail Router service cannot continue and will now shut down. ---> System.Xml.XmlException: Root element is missing.   at System.Xml.XmlTextReaderImpl.Throw(Exception e)   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineIn......

2008 Feb 28

7 of 178 | By Popular Demand... More HttpModule Sample Code - Several folks have asked for this, so here it is... the two other pieces of the ResourceRedirect solution from my LAYOUTS branding post. They're also the least interesting, which is why I didn't post them before. :)  Enjoy... review this post for the full context. Redirect.cs using System; using System.Collections.Generic; using System.Text; namespace MOSS.Branding { public struct Redirect { public string pattern; public string masterPageUrl; public string originalMaster; public string destinationPageUrl; public Redirect(string _pattern, string _masterPageUrl, string _originalMaster, string _destinationPageUrl) { pattern = _pattern; masterPageUrl = _masterPageUrl; orig......

2008 Feb 05

8 of 178 | LINQ to SQL - Implementing the Repository pattern - I have been working for the past few days to try and figure out how to get LINQ to SQL integrated into my normal nTier environment. I have also been trying to follow along with the general principles of Domain Driven Design but am finding that there are some deficiencies in the current LINQ to SQL implementation that force a few restrictions on how I do things. Let's first look at some of the restrictions Disconnected DataContext My understanding of the LINQ to SQL DataContext is that it prefers to remain open.  The primary reason for this is that its sole purpose in life is to track the state of it's objects.  As you add new objects into your collections, modify existing objects, or del......

2008 Jan 29

9 of 178 | Graffiti CMS | User Entry - We're using Graffiti CMS as our CMS for Coders 4 Charities, a site that we built to spread the word about our charity event coming late April 2008. We needed to implement a registration page, so that developers and charities can register for the event. Graffiti is obviously very powerful and easy to use, but I had a hard time figuring out how to get user entry to work. Here is my fundamental understanding of how things kinda work: When you create a post, Graffiti will create a folder for your post, and create a default.aspx page. If you categorize the post, it will put your new page under the category sub-dir. When your default.aspx page renders, Graffiti will look for a .view file that ......

2008 Jan 24

10 of 178 | Reading Messages for Validation - How do I perform XML validation against an entire message? There is a method to read the body of the message but it's only possible to read headers one at a time. Although it sounds more complicated than it really is, a straightforward way to read an entire message is to write it instead. With the Message interface, you have more flexibility when writing a message to an XmlWriter than when reading from a generated XmlReader. Exchanging the roles of readers and writers is a common trick used in XML processing. Here's a really short example of using an XmlWriter with some seekable storage. I've replaced the validation step with dumping out the contents of the message. Message mes......

2008 Jan 18

11 of 178 | .NET Framework ????? ???? ??(2008/01) - .NET Framework Library Source Code now available - ScottGu's Blog ??? ????? ?????? ?? ??? ???????. ??? ??? ??? ??? ????: .NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc). ASP.NET (System.Web, System.Web.Extensions) Windows Forms (System.Windows.Forms) Windows Presentation Foundation (System.Windows) ADO.NET and XML (System.Data and System.Xml) ?? ??? ??? ?? ??? ?? ??? ??? ?? ? ?? ??? ??? ?? ???? ?? ???? ??? ??? ??? ???? ???? ???? ?????. ?? ? ??? ?????, ????? ?......

12 of 178 | Debugging the .NET Framework Library Source Code - A while ago, I talked about Microsoft releasing the source code for the .NET Framework in order for you to debug it through Visual Studio 2008. Just a few days ago, it was finally released. Shawn Burke has an excellent and detailed post explaining how to set this up and also has a trouble shooting section. Currently, the following libraries have been released: NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc). ASP.NET (System.Web, System.Web.Extensions) Windows Forms (S......

2008 Jan 17

13 of 178 | Microsoft releases .Net Framework Library Source - Yup, you heard it right, Microsoft has released the source code of the .NET Framework libraries .. they haven’t gone all the way and open sourced it but they have made the source available for debugging and reference, this is very exciting because I’m sure there is a lot in there to learn. The libraries open sourced include … NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc). ASP.NET (System.Web, System.Web.Extensions) Windows Forms (System.Windows.Forms) Windows Presentat......

2008 Jan 16

14 of 178 | XML namespace declarations in SyndicationFeed objects - Following on the heels of Steve Maine's post about namespaces in Syndication objects (Feeds, items, etc.), I thought it wise to plug the new stuff in PictureServices. At the moment, PictureServices implements SLE (Simple List Extensions), and does a pretty crude job of it at that. Time permitting, I will add more support for field and group customization. For now, it serves as an example more than a carrier grade implementation. In any event, I used extension methods in the following type definition to make it easy to insert the right namespace declarations in the feed:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel.Syndic......

2008 Jan 15

15 of 178 | Declaring XML Namespaces on a SyndicationFeed - Lots of folks have asked me how to add various XMLism like XML Namespace prefixes to the serialized output of a SyndicationFeed. This is actually easy to do once you know the trick but it's admittedly not the most obvious thing in the world. The thing to remember is that the System.Xml stack treats prefix declarations as special kinds of attributes. If you want to emit an XML namespace declaration of xmlns:contoso=http://schemas.contoso.com you need to emit attribute whose name is the prefix you're declaring (e.g. "contoso"), whose value is the namespace URI that corresponds to the prefix (e.g. 'http://schemas.contoso.com'). This attribute needs to be in the special XML namesp......

2007 Dec 19

16 of 178 | How To Read XML Data into a DataSet by Using Visual C# .NET - How To Read XML Data into a DataSet by Using Visual C# .NET   Original MSDN article: http://support.microsoft.com/kb/311566       public class XMLtoDataset     {         public static DataSet GetDatasetFromXMLString(string inString)         {             StringReader StringReader;             XmlReader XmlReader = null;               try             {                 Console.WriteLine("Initializing StringReader ...");                   if (inString.IndexOf("<?xml version='1.0'?>") == -1)                 {                     inString = "<?xml version='1.0'?>" + inString;                 }                 //StringReader = new StringReader("<?xml version='1.0......

2007 Dec 13

17 of 178 | Sharepoint DataFormWebPart overriding the SetDataSourceProperties method - Well firstly - I've got to say this comes off the back of a great Sharepoint MVP and collegue of mine Ishai Sagi. Big THANKS Ishai!!! Typically my experience with the DataFormWebPart has been through the eyes of Sharepoint Designer - open pages with webparts on them and looking at the XML configuration of these parts. It look pretty ugly AND very site/web specific - IDs all over the place etc etc. Ishai the wealth of knowledge came up with this solution - by overriding the SetDataSourceProperties method, you can effectively create a datasource from anywhere!!!! Forgetting the IDs etc that cause all the pain. I've marked the 2 i......

2007 Dec 10

18 of 178 | Integrating BizUnit & LoadGen - I have been setting up some performance tests using LoadGen today and was having a couple of problems where the message sent by LoadGen wasnt working properly and it was a bit of a pain trying to workout the cause of the problem. After 10 minutes I thought hang on ive got BizUnit tests which do exactly what I want except that I just want to run them a lot of times.  This made me think back to something Ewan Fairweather said back at TechEd Barcelona about potentially integrating LoadGen and BizUnit.  A bit of a google didnt bring up many results so I have a look at writing my own transport provider for LoadGen. This was very easy. I started off by creating a new C# project and added the f......

2007 Dec 07

19 of 178 | System.Xml.Linq and Office Open XML - Starting to play with those. So just FYE, here is what I wrote yesterday: // create the new document.xml package part Uri documentUri = new Uri("/word/document.xml", UriKind.Relative); PackagePart documentPart = package.CreatePart(documentUri, "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");   XNamespace r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"; XNamespace wp = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"; XNamespace w = "http://schemas.openxmlformats.org/wordprocessingml/2006/main"; XNamespace dm = "http://schemas.openxmlformats.org/drawingml/2006/main"; XNamespace dp = "http://sc......

2007 Nov 20

20 of 178 | TDD, BizTalk, Mocking and you... - Lately a lot of my work has focused on BizTalk for some custom solutions.  I'm a big fan of BizUnit as a unit testing tool for BizTalk, as it is pretty much the only option.  But, what happens when you call custom components through Expression shapes?  Take for example this custom code snippet public class OrchestrationHelper {      public static void ProcessDocument(XLANGMessage bizTalkMessage)      {           Stream bizTalkStream = (Stream)bizTalkMessage[0].RetrieveAs(typeof(Stream));           // Do Stuff      } } Instead, we should try to abstract the XLANGMessage as much as possible since there are many common operations we might do with it.  Let's define an interf......

2007 Nov 15

21 of 178 | Root element is missing. - The following code doesn't work; the exception message reads "Root element is missing.": MemoryStream transformed = new MemoryStream(); XmlDocument doc = new XmlDocument(); XmlReader input = null; XslCompiledTransform xslt = new XslCompiledTransform(); input = XmlReader.Create("Example.xml"); xslt.Load("Example.xslt"); xslt.Transform(input, new XsltArgumentList(), transformed); try { doc.Load(transformed); } catch (Exception ex) { Console.WriteLine("XmlDocument.Load failed: {0}", ex.Message); } Console.ReadLine(); It isn't a problem with the input file or the transform script.  The problem is that the XslCompiledTransform.Transform function leaves the stre......

2007 Nov 13

22 of 178 | Silverlight Xunit.net Test Runner - A couple of people have asked if I could share the code for my experimental Xunit.net silverlight v1.1 test runner. Actually, the stuff I did was fairly simple and not very polished, but I'll should get someone else started on building a real runner out of it You can download the code here. Some things to keep in mind: The zip doesn't contain all the code. Only the silverlight specific parts: The sample test HTML page and its JS scripts The silverlight control XAML The TestRunnerView, a Canvas derived class that implements the actual silverlight control This means you still need to go and ......

2007 Oct 25

23 of 178 | Data Interpolation with SPLINE in C# - Often, when dealing with mathematical models for hazard estimation, one has to make the most out of just a handful of experimental data, and try to extract a rule or a behavioural function. While the use of lookup charts printed on paper may sometimes be a viable option, we won’t be able to rely on it when we want to implement a software solution. When this is the case, soft-computing may look like the perfect solution; neural networks can process data, learn their trend, and elaborate new samples to fill the gaps; but this would involve a considerable use of computational resources (and a lot more time). So, how can we find a good compromise? A simple and fast solution for the approxim......

2007 Jul 12

24 of 178 | Producing XHTML using XSLT in .NET - Producing XHTML using XSLT 1.0 processor is tough (no wonder - XSLT 1.0 is so old - it was published even before XHTML 1.0). While XHTML is just XML, XHTML spec defines a set of very specific formatting rules called "HTML Compatibility Guidelines". The goal is to facilitate rendering of XHTML by HTML browsers (such as Internet Explorer :). The guidelines say for instance that elements with non-empty content model (such as <p>) must never be serialized in minimized form (<p />), while elements with empty content model (such as <br>) must never be serialized in full form (<br></br>). While XML doesn't care about such nonsense, HTML brow......

2007 May 31

25 of 178 | Orchestration performance - So I had to fire up my XP laptop today because my new Rode Podcaster microphone (which is otherwise is totally awesome) won't start on Vista despite getting a usbaudio.sys hotfix from MS Support (which was a suprisingly painless experience).  Anyway - cleaning out my old harddrive I found this picture:   This is a picture of the BAM portal.  What I was doing was using BAM to give me some rough performance metrics between two version of an orchestration.  In the "XmlDocument" version of the orchestration I was reading in a 9MB Xml file into BizTalk.  In the orchestration I was passing the document to a .NET component as "XmlDocument" and reading the whole docum......

2007 May 30

26 of 178 | Orchestration performance - So I had to fire up my XP laptop today because my new Rode Podcaster microphone (which is otherwise is totally awesome) won't start on Vista despite getting a usbaudio.sys hotfix from MS Support (which was a suprisingly painless experience).  Anyway - cleaning out my old harddrive I found this picture:   This is a picture of the BAM portal.  What I was doing was using BAM to give me some rough performance metrics between two version of an orchestration.  In the "XmlDocument" version of the orchestration I was reading in a 9MB Xml file into BizTalk.  In the orchestration I was passing the document to a .NET component as "XmlDocument" an......

2007 May 01

27 of 178 | New XML Editor named “XML Notepad 2006? from Microsoft! - XML Notepad 2006 provides a simple intuitive User Interface for browsing and editing XML documents. XML Notepad shows how to use some advanced features of System.XML in the .NET Frameworks 2.0. The download includes source code. See the handy design doc...(read more)...

28 of 178 | XML, Silverlight, and... - Microsoft XML Team's WebLog : Live from MIX07: Silverlight and XML! XML Features in Silverlight In the Silverlight 1.1 Alpha release, we have enabled streamed XML reading and writing through the XmlReader and XmlWriter, respectively. That's it, you say? For......

2007 Apr 18

29 of 178 | HOW TO: Pipeline XSLT Transformations in .NET 2.0 Applications - I mean pre-XProc XSLT pipeline - just when you need to transform an XML document by a sequence of XSLT stylesheets - output from the first transformation goes as input to the second one and so on. This is useful technique helping dramatically simplify your complex multi-stage XSLT stylesheets. Unfortunately there is no simple way to perform such task effectively in .NET 2.0. Here I show you how Mvp.Xml project comes to the rescue. Note: there is old crappy Microsoft KB article 320847 suggesting pipelining XSLT via byte buffer, Bleh!, don't do this. The problem is that while the most efficient (fastest, taking less memory) XML store for doing XSLT transform......

2007 Apr 02

30 of 178 | To Trust, or Not to Trust? - Validation of an XML document against an Xml Schema guarantees that the structure and content of the xml conforms to the types defined in the schema. Does this mean that we automatically elevate the trust level of a document that has passed schema validation? Can we use schema validation as a security layer to our application?   The general recommendation is that validation of an xml document should not preclude the need for secure coding practices in the application that consumes the validated data.  That being the case, we know of applications where length facets are used to ensure that a input parameter is not longer than the specified length, pattern facets are used to verif......

2007 Mar 24

31 of 178 | Streaming with LINQ to XML - Part 2 - In the first post in this series we gave some background to a problem the LINQ to XML design team has been working on for some time: how to easily yet efficiently work with very large XML documents.  In today's world, developers have a somewhat unpleasant choice between doing this efficiently with fairly difficult APIs such as the XmlReader/XmlWriter or SAX, and doing this easily with DOM or XSLT and accepting a fairly steep performance penalty as documents get very large. Let's consider a real world example - Wikipedia abstract files.  Wikipedia offers free copies of all content to interested users, on an immense number of topics and in several human languages.  Needl......

2007 Mar 12

32 of 178 | MSXML4 is going to be kill bit-ed - Hi,   As a part of our MSXML4 End of Life plan , we are going to kill bit MSXML4 in the October – December timeframe of this year. Kill Bit applies to Internet Explorer only. After the kill bit , applications will not be able to create MSXML4 objects in the browser.(Add link for killbit) Applications outside IE like C++ apps will continue to work with MSXML4.   We are announcing this in advance so that our customers get sufficient time to try their applications with MSXML6 and give us feedback on their experience.  Please email us at msxml4@microsoft.com  with feedback/questions/concerns.     Why:   We are going to kill-bit MSXML4 to ensure a secu......

33 of 178 | Upgrading to MSXML 6.0 -               Contents Upgrading to MSXML 6.0. 1 1.       Abstract 1 2.       Installation & Upgrade. 2 3.       Security Migration – Understanding Off-By-Default 3 4.       Improving W3C XSD 1.0 Conformance & Compatibility with System.Xml 2.0: Changes to the XmlSchemaCache: 7 5.       Obsolete features/Classes. 8     Abstract   Microsoft Core XML Services (MSXML) 6.0 is the current version of the core XML stack in the COM / Scripting environment.  ......

2007 Mar 06

34 of 178 | Streaming with LINQ to XML - Part 1 - This is the first of a multi-post series on how to use LINQ to XML in scenarios that require streaming over a large input and/or output data source rather than loading a document into memory, processing it, and saving it. A considerable number of XML users are faced with a dilemma: they are asked to process very large data sources, but their tools (such as DOM and XSLT) assume that the data can be loaded into an in-memory tree. The option of simply writing smaller files may not be available or appropriate. For example, XML is increasingly used as a format for database dumps and logfiles which are intrinsically large. The only currently supported option  in the .NET environment is to u......

2007 Mar 04

35 of 178 | The new LINQ to XML “Bridge Classes” to System.Xml - In a previous post we presented an overview of the XML Features in the "Orcas" Community Technology Preview. This post gives some more details and examples for what we call the "bridge classes" that let one use other System.Xml APIs over a LINQ to XML tree. For example, LINQ to XML users can now create a tree in memory with an XmlWriter application or as the output of an XSLT transformation, validate a loaded tree against an XSD schema, use XPath 1.0 to query and XSLT 1.0 to transform the tree, and so forth. Why do this? Can't a developer already do anything with a LINQ query that can be done with XPath? Doesn't the combination of LINQ queries and functional construction do more o......

2007 Feb 28

36 of 178 | February CTP of Visual Studio "Orcas" / .NET 3.5 is out - The Community Technology Preview of the next version of the .NET components that the XML team ships is ready for download.  It is available in two forms: a self-extracting installer that will setup a version of Visual Studio that can co-exist side by side with VS 2005, and a Virtual PC image. The new stuff includes: XML Tools: XSLT Debugger Enables Input Data Breakpoints allowing the user to break the execution of the style-sheet whenever a certain node in input document is hit. XML Editor Performance Improvements Performance in the Xml Editor for Intellisense, schema validation etc is improved by implementing incremental parsing of the XML Document. Seamless transit......

2007 Feb 21

37 of 178 | R.I.P. GotDotNet - Microsoft decided to shut down GotDotNet site by July 2007. The official announcement goes like this: Microsoft will be phasing out the GotDotNet site by July 2007. Microsoft will phase out all GotDotNet functionality by July 2007. We will phase out features according to the schedule below. During the phase-out we will ensure that requests for features or pages that are no longer available will render enough information for you to understand what has changed. If you have any questions please don’t hesitate to contact the GotDotNet Support team.We are phasing out GotDotNet for the following reasons: Microsoft wants to eliminate redundant functionality between GotDotNet and othe......

2007 Feb 01

38 of 178 | IBM's developerWorks has published Pull parsing XML in PHP, an introductory tutorial about PHP5's new XMLReader class. - IBM's developerWorks has published Pull parsing XML in PHP, an introductory tutorial about PHP5's new XMLReader class: More......

2007 Jan 29

39 of 178 | XSLT 2.0 - We are pleased to note that XSLT 2.0 and XPath 2.0 are now W3C Recommendations.  Microsoft contributed thousands of person-hours to the W3C efforts that developed these standards and is committed assist with the further development of XML standards at W3C.  XSLT / XPath 2.0 offer nice improvements over 1.0 in several ways, including an ability to leverage schema-defined datatypes, support for regular expressions, support for user-defined functions, and especially a much easier way to aggregate results into groups.   Neither are yet implemented over standalone documents in our libraries, mainly because we have a policy of not implementing W3C specifications in the core ......

2007 Jan 21

40 of 178 | Loading XSLT stylesheets embedded into an assembly - the right way - Everybody knows that XSLT stylesheet can be embedded into an assembly by setting in Visual Studio its "BuildAction" property to "Embedded Resource". Such stylesheet then can be loaded using Assembly.GetManifestResourceStream() method. But in fact, this is actually wrong way of loading embedded stylesheets, because once smarty-pants XML developer goes and breaks XSLT stylesheet into modules it suddenly stops working - xsl:import/xsl:include are not compatible with loading stylesheet via  Assembly.GetManifestResourceStream(). The right way of loading embedded stylesheets is via XmlResolver. Having custom XmlResolver loading stylesheet from an assembly solves th......

2006 Dec 19

41 of 178 | Using ms:string-compare() and the rest MS extension functions in XPath-only context - XslCompiledTransform implements the following useful MSXML extension functions. But what if you need to use them in XPath-only context - when evaluating XPath queries using XPathNavigator? Function Signature and description ms:string-compare number ms:string-compare(string x, string y[, string language[, string options]])Performs lexicographical string comparison. ms:utc string ms:utc(string time)Converts the prefixed date/time related values into Coordinated Universal Time and into a fixed (normalized) representation that can be sorted and compared lexicographically. ms:namespace-uri string ms:namespace-uri(string name)Resolves the prefix part of a qualified name into......

2006 Dec 12

42 of 178 | HtmlAgilityPack - DOM and XPath over HTML - I saw today Josh Christie post about "Better HTML parsing and validation with HtmlAgilityPack". HtmlAgilityPack is an open source project on CodePlex.  It provides standard DOM APIs and XPath navigation -- even when the HTML is not well-formed! Well, DOM and XPath over malformed HTML isn't new idea. I've been using XPath when screenscraping HTML for years - it seems to me way more reliable method that regular expressions. All you need in .NET is to read HTML as XML using wonderful SgmlReader from Chris Lovett. SgmlReader is an XmlReader API over any SGML document such as HTML. But what I don't get is why would anyone (but browser vendors) ......

2006 Dec 06

43 of 178 | Java 6 gets pull XML API - Better late than never - forthcoming Java 6 (currently Release Candidate) will include StAX, pull based streaming XML API.  .NET has pull based XML parser (XmlReader) from the very beginning and Microsoft was arguing .NET's XmlReader is better than SAX since at least 2002. No, I'm not saying Java catches .NET up with one more feature, no. I'm just glad I wil be able to parse XML using the same model and very similar API on both platforms. ...

2006 Nov 16

44 of 178 |