473,789 Members | 2,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

custom XPathNavigator implementation

I'm trying to build a couple classes that would allow for writing xsl
transforms against data that is not originally xml. I've got an xmlreader
implementation that seems to work well. Based on some issues with it and
transforms, I then wrapped it up in a custom xpathnavigator implementation.
Everything works fine from the transform functionality perspective, but it's
not scaling well to larger amounts of data, and I would like to find out if
these are framework limitations or results of my lack of knowledge.
Specifically, if I pass my xpathnavigator object into the transform method of
an xsltransform object along with a streamwriter instance, I'm expecting the
transform to be able to stream the result to the streamwriter without needing
to finish the entire transform first. Now, I could see some issues depending
on xsl options, but in a perfect world, with a perfect xsl, is this at all
possible? Also, I'm noticing that the xpathnavigator instance gets cloned
like crazy, at least once per node, creating millions of instances during the
transform. Can someone explain this to me?
Nov 12 '05 #1
1 2167
Hi Bruce,

Yes , the xsltransform streams the results to the writer as it transforms
and does not wait till the entire transform is finished to do it.

Regarding the cloning , since navigator is a pointer to node , the only way
to keep track of multiple nodes is to clone the navigator and make it point
to a different node. Since nodeset operations require the engine to keep
pointers to multiple nodes , the navigator gets cloned.

Cloning can be reduced by optimizing the stylesheet if possible. We have
done work to reduce the amount of cloning in whidbey , so that should help
as well.

Thanks
Nithya
"Bruce Dunwiddie" <Bruce Du*******@discu ssions.microsof t.com> wrote in
message news:BD******** *************** ***********@mic rosoft.com...
I'm trying to build a couple classes that would allow for writing xsl
transforms against data that is not originally xml. I've got an xmlreader
implementation that seems to work well. Based on some issues with it and
transforms, I then wrapped it up in a custom xpathnavigator
implementation.
Everything works fine from the transform functionality perspective, but
it's
not scaling well to larger amounts of data, and I would like to find out
if
these are framework limitations or results of my lack of knowledge.
Specifically, if I pass my xpathnavigator object into the transform method
of
an xsltransform object along with a streamwriter instance, I'm expecting
the
transform to be able to stream the result to the streamwriter without
needing
to finish the entire transform first. Now, I could see some issues
depending
on xsl options, but in a perfect world, with a perfect xsl, is this at all
possible? Also, I'm noticing that the xpathnavigator instance gets cloned
like crazy, at least once per node, creating millions of instances during
the
transform. Can someone explain this to me?

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3378
by: Craig Pearson | last post by:
Hi My function receives an XPathNavigator object. From here I need to build a DataSet to load into SQL Server (using SQLXML adaptor). Does anyone have an idea on the most efficient way to convert the XPathNavigator into a DataSet? Here is what I have at the moment: void function DoSomething( string xmlSchemeFile, System.Xml.XPath.XPathNavigator nav ) {
7
3900
by: news.microsoft.com | last post by:
Hi, Is the compilation of XSLT, using XPathNavigator.Compile, only beneficial when the returned XPathExpression is cached? Next question, how do I cache the returned XPathExpression object? Should I programmatically cache it or is it automatically cached when the Compile method is called? Thanks
7
4088
by: David Thielen | last post by:
Hi; Is there a way from an XPathNavigator object to get an xpath string that will, when used in a Select(xpath) on the underlying base/root XPathNavigator return the same XPathNavigator? In other words, I initially create an XPathNavigator for my entire xml document. To get an XPathNavigator object who's root is a given node in the original xml document, there is a unique xpath that will return that node. The unique xpath could have,...
12
3965
by: David Thielen | last post by:
Hi; I have an element: <space> </space> When I call SelectSingleNode() on it, the InnerXml is a 0 length String, not a String containing 1 space. Any ideas?
2
2897
by: JSheble | last post by:
I'm integrating with a customer application, and in their assembly, when I call a method it returns data to us as an XPathNavigator object. I can parse the various elements I need out of this object with no problem, but what I cannot seem to do is get at the actual XML string itself. For accountability, tracking, auditing, and logging, I need to save the XML as an XML file in an archive folder, but there doesn't seem to be any way of...
11
6467
by: ericms | last post by:
Can anybody show me how to insert a CDATA section using XPathNavigator ? I have tried the follwing with no luck: XmlDocument docNav = new XmlDocument(); docNav.LoadXml(xmlString); XPathNavigator nav = docNav.CreateNavigator(); XmlDocument doc = new XmlDocument(); doc.LoadXml("<DocumentData></DocumentData>"); XmlElement elem = doc.CreateElement(currentNodeName);
4
4404
by: Bruce Sandeman | last post by:
Hi, Does anyone know how to serialize an XPathNavigator object? I have tried the following but it moans that the xpn does not have a parameterless constructor. XPathNavigator xpn = e.Source.SelectSingleNode("/ns1:Invoice/ns1:InvoiceDetail/ns1:Lines/ns1:Line/ns1:Matches/ns1:Match/ns1:SubLedger", this.NamespaceManager); XmlSerializer x = new XmlSerializer(xpn.GetType()); StringWriter tw = new StringWriter();
2
4543
by: =?Utf-8?B?Tm9yZW1hYw==?= | last post by:
Hi. Using VS2005, .NET 2.0. I have an xml document that I want to go through and set the values on attributes of elements. The elements are complex types defined in my schema (xsd) files. I can iterate the document and get my XmlType and XmlBaseType values just fine. However, as soon as I call SetValue to write to an attribute, the
1
4385
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property grid doesn't show colloections i.e. if I have a List<Objectthen the Collection is shown but when I click on the "..." button next to it nothing comes up. If I say CustomPropertyGrid p = new CustomPropertyGrid(); p.SelectedObject = new...
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.