|
Guys,
I have tried to implement the default stylesheet which IE uses to display xml files. Now with a few tweaks to this stylesheet i have tried to acheive one thing that i needed to i.e creating a generic stylesheet which would be applicable to any xml file. I also wanted to display the xml file in the same manner as IE. Now instead of the - and + i have prepended a checkbox. What i need now is to be able to work with these checkboxes. Say like if i select the check box for the parent node all it's child nodes should get selected after this is achieved i need to also incorporate the delete node functionality. When a node is selected it should be deleted from the xml file which in my case would be simply commenting the node in case the user wants the node back.
If there is any other possible way out please lemme know. And yep would it be possible for any of u guys to just gimme a solution as soon as possible.
Please mail me anf i'll send u the xml and xsl files for review.
Regards
Wilbur J. Pereira
"If they love me let them, for the heck of it.If they don't, who da heck cares about it"
|
|
|
|
|
This question arises in my mind when I was reading regarding Yukon support for the XML. My question is in two parts,
"How many there use XML as Pure Database?"
"when we should go for XML as database?"
any comments appreciated
|
|
|
|
|
this questions going through my head too, hope to get comments
|
|
|
|
|
Hi ,
I have an xslt file where I need to implement the logic like this...
param test
for each items
//if the item is parent then set parameter value to the id of the parent
//if not then leave the param value as is..i.e it should have parent id value
if items.parent = true then
test = select parent id
end if
call template displayItems
with param test
end for
I need to set the value of test to parent id when the item is parent node. if it is not parent node (that means it is child node) then I need to retain the value of test (which is parent id). It should not overwrite it with empty string(since the condition is not met). Only if the condition is met then I need to set the value else I need to have the previous value. Basically I was trying to find the parent ids for all the childrens. Please let me know how to do it.
Thanks,
Sridhar!!
|
|
|
|
|
I want to represent a small user guide as an XML document. It will have chapters and headings and text. I can build my schema and it looks OK but I wonder about the text. Is there some limit on the amount of text that can be stored under one tag? Should I just store the text part in separate files and have my XML reference the correct filename so that when my program displays the user guide it loads files containing the text as and when needed?
|
|
|
|
|
|
Hello,
I have a XML file (RSS 2.0 format). Something as follows:
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>News</title>
<description>Latest News</description>
<item>
<title>Title</title>
<link>Url</link>
<description>Description</description>
<pubDate>Fri, 20 May 2005 12:30:00 GMT</pubDate>
</item>
...
I need to do the following:
1. Get last 10 items according to its pubDate.
2. Get the data of these items form the XML to the DataSet.
3. Make the pubDate in each DataSet row as a standard ASP.Net format.
In this moment I was able to load all items to a dataset but I wasn't able to fulfill the objectives as I described in (1) and (3).
Could someone help me?
Here is my code:
Dim news As New XmlDocument()
news.Load("http://www.domain.com/news.rss")
Dim x As Integer
Dim xNodeList As XmlNodeList = news.SelectNodes("/rss[@version='2.0']/channel/item")
Dim dsNews As DataSet = New DataSet()
Dim xReader As XmlTextReader
For x = 0 To xNodeList.Count-1
xReader = New XmlTextReader(xNodeList.item(x).OuterXml, XmlNodeType.Element, new XmlParserContext(Nothing, Nothing, Nothing, XmlSpace.None))
dsNews.ReadXml(xReader, XmlReadMode.InferSchema)
Next x
Thank You,
Miguel
|
|
|
|
|
Hi All,
In my page i have more than 100 controls. I have been using "XML Dynamic validation" for my page validation. i used the code from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspdatastructures.asp. i need a help to create a nested compare validator.
i put a sample xml code here:
<ValidatorCollection id="plHospDateTo" FriendlyName="18. HOSPITALIZED TO DATE " LegalValues="[MM/DD/YYYY] format" ControlToValidate="txtHospDateTo">
<Validator type="RegularExpression">
<Property name="ValidationExpression" value="^(?=\d)(? ?[13578]|1[02])(\/|-|\.)31)\1|(? ?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(? :1[6-9]|[2-9]\d)?\d{2})|(? ?2(\/|-|\.)29\3(? :1[6-9]|[2-9]\d)?(? [48]|[2468][048]|[13579][26])|(? :16|[2468][048]|[3579][26])00))))|(? ?[1-9])|(?:1[0-2]))(\/|-|\.)(? ?[1-9]|1\d|2[0-8])\4(? :1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$" />
</Validator>
<Validator type="Compare">
<Property name="Type" value="Date" />
<Property name="ErrorMessage" value="18. HOSPITALIZED FROM DATE should be less than TO DATE" />
<Property name="Text" value="" />
<Property name="Operator" value="GreaterThanEqual" />
<Property name="ControlToCompare" value="txtHospDateFrom" />
</Validator>
</ValidatorCollection>
The problem:
i have a checkbox, when it is true i need to check the date validation in a textbox (txtHospDateFrom)
i think there is a way to use "valueToCompare" property.
can anyone tell me how to create a nested comparison
thank you
regards,
govind
|
|
|
|
|
Hello,
I have an ASP.Net Repeater where I display a date from a date field:
<%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %>
When the dataset is created from a database the date text format change when Thread.CurrentThread.CurrentCulture change.
However, when I create the dataset from a XML (RSS 2.0 Format) file the date is allways the entire text taken from the <pubdate> node.
I believe I need to convert the pubDate field in my dataset to a convenient date format.
Here is my code which create the dataset from the XML (RSS 2.0 Format) file:
Dim news As New XmlDocument()
news.Load("http://www.domain.com/_rss/news.rss")
Dim x As Integer
Dim xNodeList As XmlNodeList = news.SelectNodes("/rss[@version='2.0']/channel/item")
Dim dsNews As DataSet = New DataSet()
Dim xReader As XmlTextReader
For x = 0 To xNodeList.Count-1
xReader = New XmlTextReader(xNodeList.item(x).OuterXml, XmlNodeType.Element, new XmlParserContext(Nothing, Nothing, Nothing, XmlSpace.None))
dsNews.ReadXml(xReader, XmlReadMode.InferSchema)
Next x
An example of a XML (RSS 2.0 Format) file:
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>News</title>
<description>Latest News</description>
<item>
<title>Title</title>
<link>Url</link>
<description>Description</description>
<pubDate>Fri, 20 May 2005 12:30:00 GMT</pubDate>
</item>
...
Can someone help me out?
Thanks,
Miguel
|
|
|
|
|
You need to reformat this somewhere, obviously. ( That is, you're saying this format will not do ). Assuming you're not generating the XML, I'd be inclined not to mess with it outside the presentation layer. Will Convert.ToDateTime accept this string ? That would definately be the nicest solution.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I think this would sort it out:
System.DateTime dt = Convert.ToDateTime("Thu, 30 Dec 2004 13:52:52 GMT").ToUniversalTime();
The ideal would be to apply this change all rows of [pubDate] field in my dataset.
Is this possible?
Doing it when loading the data from the XML file it might become a problem for other reasons.
Thanks,
Miguel
|
|
|
|
|
shapper wrote:
The ideal would be to apply this change all rows of [pubDate] field in my dataset.
Is this possible?
You could iterate through and change them all, but I don't think there's a way to do it on everything in one line.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
- <barceloDS_responses ip="61.16.159.36, 61.16.159.36">
- <response>
- <request type="establishment list" id="9">
<language_code>ING</language_code>
- <agency>
<primary>888</primary>
<secondary>88</secondary>
<detail>888</detail>
<branch>1</branch>
</agency>
- <location>
<destination_code>PMI</destination_code>
<zone_code />
</location>
<establishment_code>271</establishment_code>
<category_code />
</request>
- <establishment>
<code>271</code>
<description>Tryp Bellver</description>
- <category>
<code>4EST</code>
<description>4 STARS</description>
</category>
- <location>
- <destination>
<code>PMI</code>
<description>Majorca</description>
</destination>
- <zone>
<code>10</code>
<description>Palma</description>
</zone>
</location>
- <characteristics>
<city>PALMA DE MALLORCA</city>
<address>PS MARITIMO, 11</address>
<postal_code>7014</postal_code>
<telephone_number>971735142</telephone_number>
<fax_number>971284182</fax_number>
<long_description>Built in 1970 and renovated in 2000 the hotel has 384 rooms, including 381 doubles and 3 suites, on 16 floors. The hotel also boasts a small garden. The facilities include a lobby, a 24-hour reception, a currency exchange desk and lifts. A caf as well as a pianobar which puts on live music 6 days a week are also to be found inside the complex. Internet access, an air-conditioned la carte restaurant with children's highchairs, a TV room as well as 9 conference rooms suitable for up to 150 people are furthermore all available in addition to room service and medical assistance.</long_description>
- <capacity>
<characteristic name="SINGLE ROOMS">51</characteristic>
<characteristic name="TWINS">355</characteristic>
<characteristic name="JUNIOR SUITES">3</characteristic>
<characteristic name="TOTAL CAPACITY">729</characteristic>
</capacity>
- <building>
<characteristic name="BUILT IN">1970</characteristic>
<characteristic name="RENOVATED">1999</characteristic>
<characteristic name="FLOORS">16</characteristic>
</building>
- <distances>
<characteristic name="BEACH">7 kms</characteristic>
<characteristic name="MEDIC.CENTRE">2 kms</characteristic>
<characteristic name="BUS STOP">50 mts</characteristic>
<characteristic name="RESORT CENTRE">2 kms</characteristic>
<characteristic name="AIRPORT">7 kms</characteristic>
<characteristic name="GOLF COURSE">6 kms</characteristic>
</distances>
<hotel_photo>http://www.hotelbeds.com/giata/old/MALLORCA/MELIABELLVER/MELIABELLVERHOT.JPG</hotel_photo>
<room_photo>http://www.hotelbeds.com/giata/old/MALLORCA/MELIABELLVER/BELLVERHAB.JPG</room_photo>
</characteristics>
- <room_facilities>
- <facility>
<code>1</code>
<description>Private bathroom / Shower</description>
<available>Y</available>
</facility>
- <facility>
<code>2</code>
<description>Telephone</description>
<available>Y</available>
</facility>
- <facility>
<code>3</code>
<description>Air conditioning</description>
<available>Y</available>
</facility>
- <facility>
<code>4</code>
<description>Local TV</description>
<available>Y</available>
</facility>
- <facility>
<code>5</code>
<description>Satellite TV channels</description>
<available>Y</available>
</facility>
- <facility>
<code>6</code>
<description>Mini-Bar / Fridge</description>
<available>Y</available>
</facility>
- <facility>
<code>7</code>
<description>Safety deposit box</description>
<available>Y</available>
</facility>
- <facility>
<code>8</code>
<description>Hair dryer</description>
<available>Y</available>
</facility>
- <facility>
<code>9</code>
<description>Ironing board</description>
<available>N</available>
</facility>
- <facility>
<code>10</code>
<description>Piped music</description>
<available>Y</available>
</facility>
- <facility>
<code>11</code>
<description>Terrace/Balcony</description>
<available>Y</available>
</facility>
- <facility>
<code>12</code>
<description>Central heating</description>
<available>Y</available>
</facility>
</room_facilities>
- <hotel_facilities>
- <facility>
<code>1</code>
<description>Bar</description>
<available>Y</available>
</facility>
- <facility>
<code>2</code>
<description>Restaurant</description>
<available>Y</available>
</facility>
- <facility>
<code>3</code>
<description>Garage / Carpark</description>
<available>N</available>
</facility>
- <facility>
<code>4</code>
<description>Laundry service</description>
<available>Y</available>
</facility>
- <facility>
<code>5</code>
<description>Room service</description>
<available>Y</available>
</facility>
- <facility>
<code>6</code>
<description>Swimming pool</description>
<available>Y</available>
</facility>
- <facility>
<code>7</code>
<description>Gymnasium</description>
<available>N</available>
</facility>
- <facility>
<code>8</code>
<description>Sauna</description>
<available>N</available>
</facility>
- <facility>
<code>9</code>
<description>Hairdresser</description>
<available>N</available>
</facility>
- <facility>
<code>10</code>
<description>Heated pool</description>
<available>N</available>
</facility>
- <facility>
<code>11</code>
<description>Handicapped facilities</description>
<available>Y</available>
</facility>
- <facility>
<code>12</code>
<description>Pets Allowed (5 Kg)</description>
<available>N</available>
</facility>
- <facility>
<code>13</code>
<description>Non-smoking rooms</description>
<available>N</available>
</facility>
- <facility>
<code>14</code>
<description>Internet Access</description>
<available>N</available>
</facility>
- <facility>
<code>15</code>
<description>Connected rooms</description>
<available>N</available>
</facility>
- <facility>
<code>16</code>
<description>Buffet breakfast</description>
<available>Y</available>
</facility>
- <facility>
<code>17</code>
<description>Tennis Court</description>
<available>N</available>
</facility>
- <facility>
<code>18</code>
<description>Terrace Solarium</description>
<available>N</available>
</facility>
- <facility>
<code>19</code>
<description>Money exchange</description>
<available>Y</available>
</facility>
- <facility>
<code>20</code>
<description>Luggage room</description>
<available>Y</available>
</facility>
</hotel_facilities>
</establishment>
</response>
</barceloDS_responses>
========
plz tell me how to show this xml in datagrid through Asp.net
|
|
|
|
|
- <barcelods_responses ip="61.16.159.36, 61.16.159.36">
- <response>
- <request type="establishment list" id="9">
<language_code>ING
- <agency>
<primary>888
<secondary>88
<detail>888
<branch>1
- <location>
<destination_code>PMI
<zone_code>
<establishment_code>271
<category_code>
- <establishment>
271
<description>Tryp Bellver
- <category>
4EST
<description>4 STARS
- <location>
- <destination>
PMI
<description>Majorca
- <zone>
10
<description>Palma
- <characteristics>
<city>PALMA DE MALLORCA
PS MARITIMO, 11
<postal_code>7014
<telephone_number>971735142
<fax_number>971284182
<long_description>Built in 1970 and renovated in 2000 the hotel has 384 rooms, including 381 doubles and 3 suites, on 16 floors. The hotel also boasts a small garden. The facilities include a lobby, a 24-hour reception, a currency exchange desk and lifts. A caf as well as a pianobar which puts on live music 6 days a week are also to be found inside the complex. Internet access, an air-conditioned la carte restaurant with children's highchairs, a TV room as well as 9 conference rooms suitable for up to 150 people are furthermore all available in addition to room service and medical assistance.
- <capacity>
<characteristic name="SINGLE ROOMS">51
<characteristic name="TWINS">355
<characteristic name="JUNIOR SUITES">3
<characteristic name="TOTAL CAPACITY">729
- <building>
<characteristic name="BUILT IN">1970
<characteristic name="RENOVATED">1999
<characteristic name="FLOORS">16
- <distances>
<characteristic name="BEACH">7 kms
<characteristic name="MEDIC.CENTRE">2 kms
<characteristic name="BUS STOP">50 mts
<characteristic name="RESORT CENTRE">2 kms
<characteristic name="AIRPORT">7 kms
<characteristic name="GOLF COURSE">6 kms
<hotel_photo>http://www.hotelbeds.com/giata/old/MALLORCA/MELIABELLVER/MELIABELLVERHOT.JPG
<room_photo>http://www.hotelbeds.com/giata/old/MALLORCA/MELIABELLVER/BELLVERHAB.JPG
- <room_facilities>
- <facility>
1
<description>Private bathroom / Shower
<available>Y
- <facility>
2
<description>Telephone
<available>Y
- <facility>
3
<description>Air conditioning
<available>Y
- <facility>
4
<description>Local TV
<available>Y
- <facility>
5
<description>Satellite TV channels
<available>Y
- <facility>
6
<description>Mini-Bar / Fridge
<available>Y
- <facility>
7
<description>Safety deposit box
<available>Y
- <facility>
8
<description>Hair dryer
<available>Y
- <facility>
9
<description>Ironing board
<available>N
- <facility>
10
<description>Piped music
<available>Y
- <facility>
11
<description>Terrace/Balcony
<available>Y
- <facility>
12
<description>Central heating
<available>Y
- <hotel_facilities>
- <facility>
1
<description>Bar
<available>Y
- <facility>
2
<description>Restaurant
<available>Y
- <facility>
3
<description>Garage / Carpark
<available>N
- <facility>
4
<description>Laundry service
<available>Y
- <facility>
5
<description>Room service
<available>Y
- <facility>
6
<description>Swimming pool
<available>Y
- <facility>
7
<description>Gymnasium
<available>N
- <facility>
8
<description>Sauna
<available>N
- <facility>
9
<description>Hairdresser
<available>N
- <facility>
10
<description>Heated pool
<available>N
- <facility>
11
<description>Handicapped facilities
<available>Y
- <facility>
12
<description>Pets Allowed (5 Kg)
<available>N
- <facility>
13
<description>Non-smoking rooms
<available>N
- <facility>
14
<description>Internet Access
<available>N
- <facility>
15
<description>Connected rooms
<available>N
- <facility>
16
<description>Buffet breakfast
<available>Y
- <facility>
17
<description>Tennis Court
<available>N
- <facility>
18
<description>Terrace Solarium
<available>N
- <facility>
19
<description>Money exchange
<available>Y
- <facility>
20
<description>Luggage room
<available>Y
===============
please give code how to show the xml in datagrid
plz give me code
|
|
|
|
|
Hi,
I want to create an xml file. I am using MSXML2::IXMLDOMDocument::save() method to do so. Using the sample examples giving on net, but all are giving errors.
I am successfully able to parse an xml document, but save a new xml file always give error. And creates blank xml file.
Can anybody suggest me a sample program to save xml file.
I am using MSXML3/MSXML4 DLLs.
Thanks in advance.
|
|
|
|
|
Hello,
I have a XML file that includes the node <item>:
...
<title>...</title>
<url>...</url>
<item>
<title>title 01</title>
<description>description 01</description>
</item>
<item>
<title>title 02</title>
<description>description 02</description>
</item>
...
How to get all title and description values into a dataset or datareader?
Thank You,
Miguel
|
|
|
|
|
Hello,
I have a XML file as follows:
<channel>
<title>...</title>
<link>...</link>
<item>
<title>4 Web Version 1.0 is available since today!</title>
<link></link>
<description>...</description>
<pubDate>...</pubDate>
</item>
<item>
...
</item>
...
</channel>
I need to create a DataSet which contains all <item> records.
By having the dataset I will be able to bind it to a repeater or datagrid.
How can I do this?
This is what I have:
news.Load(Server.MapPath("xml/news.rss"))
rptNews.DataSource = news.SelectNodes("channel/item")
rptNews.DataBind()
In this moment I get an error because I am binding the nodes to the repeater.
Please, can someone tell me how to do this?
I am new to XML and I am on this project for 1 week.
Thank You,
Miguel
|
|
|
|
|
I have a little chat project which is developed in ASP and XML. But it just give one error.
If anyone can help me, then plz give me your email address, i will contact you and tell you the error
Eshban
EsHbAn BaHaDuR
|
|
|
|
|
Hi!
I'm trying to convert a simple XML file into HTML using an XSLT file but I'm lost with namespaces. Can anyone help please?
XML File:
<?xml version="1.0" encoding="utf-8"?>
<PCFiles>
<File>
<FileName>Clients</FileName>
<FileDescShort>This is the short description</FileDescShort>
</File>
</PCFiles>
XSLT:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<h2><xsl:value-of select="PCFiles/File/FileName"/></h2>
</xsl:template>
</xsl:stylesheet>
At this point, everything works fine. The result of the convertion is "<h2>Clients</h2>".
My problem is that I use VisualStudio 2003 and use a SCHEMA to build the XML file.
XSD:
<?xml version="1.0" ?>
<xs:schema id="PCFiles" targetNamespace="http://cablysuni/namespace" xmlns:mstns="http://cablysuni/namespace"
xmlns="http://cablysuni/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="PCFiles" msdata:IsDataSet="true" msdata:Locale="en-CA" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="File">
<xs:complexType>
<xs:sequence>
<xs:element name="FileName" msdata:Caption="** File Name **" type="xs:string" minOccurs="0" />
<xs:element name="FileDescShort" msdata:Caption="** Short Description **" type="xs:string" minOccurs="0" />
<xs:element name="FileExt" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
The problem is that when linking the XML file to the Schema, the XML file becomes:
<PCFiles xmlns="http://cablysuni/namespace">
...
</PCFiles>
At that point, the conversion doesn't work anymore. I have tried to add the schema in the XSLT file as well, I tried prefixes, I just can't get this to work.
Could someone help me out here? Could you post exactly what I would need to add in the XSLT file to make this work? Do I have to use schema locations? The XML file works fine in a .NET project but I suspect the Schema cannot be loaded otherwise. I'm lost with all this. Where should the schema be, how can I make the XML point to a specific location, etc.
Thank you all for the help! I really need to make this XSLT work.
Fred
Frederick Ouimet
frederick.ouimet@infocablys.com
|
|
|
|
|
|
Hi
I had an instance XmlSchema class, and now wont to get an elemetn which
included in this schema by one ID (without iteration over all document), how i can do this.
And else how i can to get corresponded XmlDocument object for this XmlSchema object,when i see my instance in "watch view" i watch what this schema has Document property but i can't get acess to one due to protection level.
THANK.
|
|
|
|
|
Hello,
I have a XML file with the following structure:
<channel>
<title>...
... <description>...
<item>
<title>4 Web Version 1.0 is available since today!
<description>...
<pubdate>...
...
I am trying to get the all item nodes and display them in a ASP:Repeater.
My code is as follows:
ASPX.VB
news.Load(Server.MapPath("xml/news.rss"))
rptNews.DataSource = news.SelectNodes("channel/item")
rptNews.DataBind()
ASPX
<asp:repeater id="rptNews" runat="server">
<itemtemplate>
<%# DataBinder.Eval(Container.DataItem, "title") %>
<%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %>
<%# DataBinder.Eval(Container.DataItem, "description") %>
I get this error:
DataBinder.Eval: 'System.Xml.XmlElement' does not contain a property with the name title.
What am I doing wrong here?
Thanks,
Miguel
|
|
|
|
|
Sorry. Something went wrong with the post. Here it is:
Hello,
I have a XML file with the following structure:
<channel>
<title>...</title>
<link>...</link>
<description>...</description>
<item>
<title>4 Web Version 1.0 is available since today!</title>
<link></link>
<description>...</description>
<pubDate>...</pubDate>
</item>
...
I am trying to get the all item nodes and display them in a ASP:Repeater.
My code is as follows:
ASPX.VB
news.Load(Server.MapPath("xml/news.rss"))
rptNews.DataSource = news.SelectNodes("channel/item")
rptNews.DataBind()
ASPX
<asp:Repeater id="rptNews" runat="server">
<ItemTemplate>
<h1><%# DataBinder.Eval(Container.DataItem, "title") %></h1>
<p><%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %></p>
<p><%# DataBinder.Eval(Container.DataItem, "description") %></p>
</ItemTemplate>
</asp:Repeater>
I get this error:
DataBinder.Eval: 'System.Xml.XmlElement' does not contain a property with the name title.
What am I doing wrong here?
Thanks,
Miguel
|
|
|
|
|
<small><b>shapper wrote:</b></small>
<i>What am I doing wrong here?</i>
1. Not clicking 'Do not treat <'s as HTML tags ( although it's arguable that it should default on in this forum )
2. You're trying to find a proeprty on the element called 'title'. I don't know that it will automatically do the XPath lookup for you, it looks not. You should write a method instead that takes the DataItem ( which is an XmlElement ) and returns the conttents of the node you want. Better yet, write a method that takes the name of the node you want, so you can call one codebehind method in all of your properties in the aspx.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sample XML document (.NET 1.1):
<doc>
<a>
<b />
</a>
<c />
</doc>
Code:
foreach (XmlNode node in doc.DocumentElement.SelectNodes(".//*")) {
node.ParentNode.RemoveChild(node);
}
The result:
<doc><c /></doc>
Should be:
<doc/>
|
|
|
|