Hi
I am having a problem doing the tranform.
Unlike all the examples I have found, I do not load my XML document via a
path but from a datacall.
I get erros when I try to do the transform (white space cannot be striped)
XmlDocument DealXmlDocument = new XmlDocument();
DealXmlDocument .LoadXml(DataCa lls);
XPathNavigator nav = DealXmlDocument .CreateNavigato r();
XslCompiledTran sform XSLTDocument = new XslCompiledTran sform();
XSLTDocument.Lo ad(xsl);
// Transform the file.
System.IO.Strin gWriter writer = new System.IO.Strin gWriter();
XSLTDocument.Tr ansform(nav, null, writer); // here is where i get the error
Thanks for any help.
BrianDH 3 2254
BrianDH wrote: I am having a problem doing the tranform. Unlike all the examples I have found, I do not load my XML document via a path but from a datacall.
I get erros when I try to do the transform (white space cannot be striped)
XmlDocument DealXmlDocument = new XmlDocument(); DealXmlDocument .LoadXml(DataCa lls);
What type is DataCalls? What does it contain? Is that a string with the
input XML markup?
Does that error occur with any input XML markup or just one particular?
Can you post how the XML looks? XPathNavigator nav = DealXmlDocument .CreateNavigato r(); XslCompiledTran sform XSLTDocument = new XslCompiledTran sform(); XSLTDocument.Lo ad(xsl);
// Transform the file. System.IO.Strin gWriter writer = new System.IO.Strin gWriter(); XSLTDocument.Tr ansform(nav, null, writer); // here is where i get the error
Can you try whether the error goes away with
XSLTDocument.Tr ansform(XmlRead er.Create(new StringReader(Da taCalls)),
null, writer)
There is usually no need to use an XmlDocument if you simply want to do
a transformation.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
Thanks!
"Martin Honnen" wrote:
BrianDH wrote:
I am having a problem doing the tranform. Unlike all the examples I have found, I do not load my XML document via a path but from a datacall.
I get erros when I try to do the transform (white space cannot be striped)
XmlDocument DealXmlDocument = new XmlDocument(); DealXmlDocument .LoadXml(DataCa lls);
What type is DataCalls? What does it contain? Is that a string with the input XML markup? Does that error occur with any input XML markup or just one particular? Can you post how the XML looks?
XPathNavigator nav = DealXmlDocument .CreateNavigato r(); XslCompiledTran sform XSLTDocument = new XslCompiledTran sform(); XSLTDocument.Lo ad(xsl);
// Transform the file. System.IO.Strin gWriter writer = new System.IO.Strin gWriter(); XSLTDocument.Tr ansform(nav, null, writer); // here is where i get the error
Can you try whether the error goes away with XSLTDocument.Tr ansform(XmlRead er.Create(new StringReader(Da taCalls)), null, writer) There is usually no need to use an XmlDocument if you simply want to do a transformation.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
BrianDH wrote: Thanks!
Does that mean that the suggestion below works for you?
"Martin Honnen" wrote:
Can you try whether the error goes away with XSLTDocument.Tr ansform(XmlRead er.Create(new StringReader(Da taCalls)), null, writer) There is usually no need to use an XmlDocument if you simply want to do a transformation.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dennis |
last post by:
Hi,
First of all, hi to you all.
I'm working on a Delphi project wich is becoming near it's deadline.
I have a very simple XSLT question wich i hope one of you folks can
help me with?
The problem is i need to transform a xml file from this:
<root>
|
by: Moogy |
last post by:
I'm pulling my hair out here. First, I'm new to XML, so that doesn't
help, but none of this makes any sense to me. All I'm trying to do is
take a simple source XML file and translate it with an XSLT to produce
HTML code.
The problem I have is that no matter what translation it runs through,
it ALWAYS includes data that I don't match in the XSLT!! All I want to
do is extract specific fields from the XML. Here's the XML source....
|
by: Gauthier |
last post by:
Hi, I've a simple issue with the use of extension objects.
I'm trying to call a text formating method from an object that I add to
my arguments collection, this method take an input string and output
the formatted string.
So far everything process correctly (the method is called without any
issue) but my problem is that the output is htmlencoded, it means that
my method (wich work as intended in other contexts) is called but the...
|
by: chris |
last post by:
Hi there,
I create an XML file from a dataset like this:
System.IO.StreamWriter xmlSW = new System.IO.StreamWriter(FILENAME);
dsUserData1.WriteXml(xmlSW, XmlWriteMode.WriteSchema);
xmlSW.Close();
Which gives me this XML file:
<NewDataSet>
|
by: Harolds |
last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005
the pmID is evaluated to "" instead of what the value is set to:
....
xmlItems.Document = pmXML
// Add the pmID parameter to the XSLT stylesheet
XsltArgumentList xsltArgList = new XsltArgumentList();
xsltArgList.AddParam("pmID", "", pmID);
xmlItems.TransformArgumentList = xsltArgList;
| |
by: cameron |
last post by:
I am attempting to pass in an XmlDocument as a parameter to a transform:
from my sample ASPX page:
string BaseDir = "/cameron/Play/ComplexParam/";
XmlDocument XSL = new XmlDocument();
XSL.Load(HttpContext.Current.Server.MapPath(BaseDir + "xsl.xsl"));
XmlDocument Data = new XmlDocument();
|
by: Trent USTA |
last post by:
I'm having a problem with line feeds in an xslcompiledtransform in .net 2.0.
I'm trying to use xsl to transform xml to a text file that can be read on a
Unix box. The problem is that when I insert a line feed, it always results
in a carriage-return/linefeed - the Unix box does not like this. I've tried
different encoding settings and using hex/dec/html values for line feed but
the result is always CRLF as viewed in a hex editor.
here's...
|
by: adi |
last post by:
hello all,
seems like a simple issue, but having tried several approaches with
no success I am posting this question,
I have a XML in one format, I want to now convert into another XML
format using XSLT.
FirstType.XML: (In this XML the States sub elements appear within USA
element)
------------------------------------------------
|
by: Hercules Dev. |
last post by:
Hi all,
I'm new in xslt and xpath, so my question might be simple but i'm
learning.
I have an XML document and need to transform it into another XML, I use
xslt and it works, but there is a case that i don't know how to solve,
I need to concat a string from multiple childs into a standard way, the
following is an example of the source and the target XML.
|
by: saritha2008 |
last post by:
Hi,
Iam working on converting one of xml file to other form of xml using XSLT.
As part of this, I need to count the no. of "component" nodes in the xml file given below.
If there is only one "component" node,i have to assign the value of this node to "component" node in my output.xml file.
If there are more than one "component" nodes in my input xml file, then i should take the first "component" alphabetically that does not start with a...
|
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...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |