|
error1408 wrote: using the xmlDocument-Class
error1408 wrote: using (XmlWriter writer = XmlWriter.Create(FullFilePath, settings))
XmlWriter is NOT XmlDocument. I strongly recommend you use the documentation[^] to find information.
|
|
|
|
|
I KNOW, that is the code I use at the moment...
I do not know how to do exactly the same with the xmlDocument-Class. Thats why i'm asking.
|
|
|
|
|
error1408 wrote: I do not know how to do exactly the same with the xmlDocument-Class.
I fail to see how that negates my original reply... I strongly recommend you use the documentation to find information.
|
|
|
|
|
I searched the documentation for my problem. And i found nothing. I checked every method.
And because i found nothing, i asked you.
|
|
|
|
|
error1408 wrote: I searched the documentation for my problem. And i found nothing.
You should probably provide that information in your initial post.
error1408 wrote: I checked every method.
I guess you missed this one[^]
|
|
|
|
|
THANK YOU. You're the man! Why didn't i see it before? At last the ugly code can be banished! Hurray
led mike wrote: You should probably provide that information in your initial post.
Yes perhaps
|
|
|
|
|
I wonder why Microsoft keeps hiding this information in the documentation?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Yeah and Google is culpable as well since they provide a perfectly usable Search Engine.
|
|
|
|
|
I'm trying to create ASPX page with DataGrid, that includes template column, which looks like TextBox. I order to enable data binding to textbox I'm using the following syntax:
<asp:TextBox runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ID")%>' ID="txtID" /> using XSL.
I supposed, the XSL code should be the same, while escaping '<','>' etc.:
<asp:TextBox runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ID")%>' ID="txtID" />.
In this case I'm getting the following error:
Parser Error Message: Code blocks are not supported in this page, because it is not compiled.
Please, assist.
Alex
-- modified at 10:06 Wednesday 29th August, 2007
|
|
|
|
|
It is objecting to the "<%# ... %>" code which gets placed in the .aspx page before it gets compiled. By the time you place your code in the page, the page has already been compiled. Also, why place a textbox in this way when you can do it statically in design mode?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Is there any workaround? Is it possible to implement this in code-behind file?
|
|
|
|
|
There are a some ways but you have to stay away from the code blocks. You may need to as your question in the ASP.NET Forum to get a better answer, but you can use XSL in the creation of a custom control or during the binding processs you can add content to a cell or even modify the whole row. However, you have to stay away from coding blocks.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks anyway
|
|
|
|
|
how to create a xml document from a given xpath
Keshav Kamat
India
|
|
|
|
|
What do you mean? XPath is just a query. If you are talking about the resulting sequence or node set from an executed XPath query, what programming or mark-up language are you using?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I am trying to put a ":" inside the XML tags. e.g.
<cnn:data>
right now it is this way:
<cnn_x0020_data>
|
|
|
|
|
The ":" is used to add a namespace to an element, for example: <xsl:element/> , where xsl is the namespace. If you are not using ":" for this reason, it should not be embedded in an element.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I'm building a schema to define data transfer tasks, the first being an export to a flat file. I'm borrowing lightly from RDL, and in my DataExport element I have DataSources and DataSets elements. Then I have an Output element that contains Sections, and each Section element has a Record element consisting of several Field elements.
Now my issue is that I have two different type Field elements, one for input fields and one for output fields. The output fields have several extra attributes such as maxWidth, format, etc. and they need a link to an input field. I would like to define one single Field element, but use child elements to differentiate between input and output fields etc. I'm thinking of placing e.g. format data into a new Format element that I could add to a Field element when it is an output field.
Suggestions, recommendations, criticism etc. are all welcome.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Add an attribute to your single Field element that will determine its type:
...
<io type="input">
<!-- child input elements -->
</io>
<io type="output">
<!-- child output elements -->
</io>
...
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks, I like that idea, but I've decided to go with a single collection of Field elements, all being output fields. The data source already provides input fields, so while RDL uses the extra indirection of mapping a set of report fields to data source fields, and then report elements, like textbox, to report fields, I don't need that. My 'report fields' are my output fields.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Hi Friends,
I am working on Javascript and I have some XML data in an object. Now I want to show that data using document.writeline() as it is.
means
I want to show the XML with all its node tags.
Please give me solution.
Thanks in advance.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
You will need to display it as text. You will need to especially change "<" to "<"! Some other character combinations may give you trouble also.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi guys,
If possible do any of you know how I can pass a List<string> object to my xslt which will form part of my SQL query?
This is what I'm tryin to achevive:
First of all I will have a class being serialized and then deserialized using XML serialized in the case Client.cs.
In the class I have a List<string> property which will return a list of Client names:
public List<string> ClientNames
Now in the next step I have an xslt that will transform my deserialized class and which will use the class properties as parameters to my SQL query.
The code within the xsl are as follows:
SELECT * FROM Client
WHERE Client.ClientFirstName IN ('Test', 'Ben', 'Tom')
Now what I'm trying to achieve is to pass the List<string> object to my SQL IN clause using xslt... is that possible?
Any help will be greatly appreciated.
R
|
|
|
|
|
I find your post unclear.
1) Are you trying to generate a SQL statement using XSLT?
if YES then...
2) as your data source for some of the SQL values you are using XML serialized from an object defined in Client.cs?
|
|
|
|
|
I have an xml similar to this :
<?xml version="1.0" encoding="UTF-8"?>
<input:root xmlns:input="cross-field-validation-namespace">
<input:event>
<input:element>UserName.SWEUserName</input:element>
<input:elementtype>INPUT</input:elementtype>
<input:eventtype>deactivate</input:eventtype>
<input:value>LOGO</input:value>
</input:event>
<input:event>
...................................
..................................
</input:event>
..........................
.........................
</input:root>
I need to transform it to the following:
.......
<properties>
<property name="element" string_value="UserName.SWEUserName"/>
<property name="elementtype" string_value="INPUT" />
<property name="eventtype" string_value="deactivate" />
<property name="value" string_value="LOGO" />
</properties>
............
i.e all child nodes under the 'event' node get transformed to the attributes of the property node(node name as 'name' attribute and value as 'string_value').
Moreover , the number and name of child nodes under the different 'event' nodes can vary.
How can we write a XSL template to convert all chiild nodes under 'event' (however much there may be) into the desired format.
|
|
|
|