|
Can't you just create a new element (empty) (<xsl:element name="col" /> ) when you find that the one in your document is empty?
~Javier Lozano
|
|
|
|
|
Hello, I couldn't use your suggestion as the col element has attributes (which need to be added while in some kind of ... "loop").
What I ended up doing is recreate the desired syntax using text output and disable-output-escaping.
<xsl:text disable-output-escaping="yes"><col
<xsl:for-each select="@*">
...
<xsl:text disable-output-escaping="yes">/>
Thanks Javier for the suggestion.
Lyteck Lynhiavu
100 Broadway Ave
New York, NY 10005
|
|
|
|
|
can anybody help me solve why this is happening? I get this exception when tryin to use a custom rendered control from XSLT.
<code>Base Exception: Cannot widen from target type to primitive type.</code>
This is caused when I apply:
<code>
<xsl:element name="ImageControl" namespace="Custom">
<xsl:attribute name="ImageStream">
<xsl:value-of select="imgfn:GetImageByAvatarID(AvatarID)"/> <-- THIS LINE IN PARTICULAR!!!
</xsl:attribute>
</xsl:element>
</code>
the XSLT Extension object (below) IS correctly loaded because i can execute my control without any problem if it is within the ASPX page itself and configured declaritively using control.ImageStream = helper.GetImageByAvatarID(x) ect.
<code>
public System.IO.Stream GetImageByAvatarID(int avatarid)
{
DataRow dr = images.Tables[0].Rows.Find(avatarid);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
foreach(Byte b in (Byte[])dr["avatar"])
{
ms.WriteByte(b);
}
ms.Position = 0;
return ms;
}
</code>
code to init the transform
<code>
public string ExecuteTransform(DataSet ds, string ThreadID)
{
DataSet dsImages = new DataSet();
DataLayer dlAvatarImages = new DataLayer("csp_avatars", DataLayerCommandType.StoredProc);
dlAvatarImages.Parameterize("@thread", ThreadID);
dsImages = dlAvatarImages.Query("avatars");
//xslt transform on post data
XmlDocument xdoc = new XmlDocument();
XslTransform xsl = new XslTransform();
StreamReader sr = new StreamReader(new MemoryStream());
xdoc.LoadXml(ds.GetXml());
//transform attributes
XsltArgumentList xList = new XsltArgumentList();
XsltDateTransform fnDate = new XsltDateTransform();
XsltAvatarGrabber fnAvatar = new XsltAvatarGrabber(dsImages);
//extension objects
xList.AddExtensionObject("urn:datetransform", fnDate);
xList.AddExtensionObject("urn:images", fnAvatar);
xsl.Load(HttpContext.Current.Server.MapPath("")+"\\ForumThread.xslt");
xsl.Transform(xdoc, xList, sr.BaseStream, null);
//reset the underlying stream
sr.BaseStream.Position = 0;
return sr.ReadToEnd();
}
</code>
Any input would be appreciated as I am completely stuck on this one.
|
|
|
|
|
Hi,
I'm pretty much a newbie to xsd's in general, and have a case in a schema I'm designing that I'm not sure how to solve. Basically I have a situation like this:
<parenttype>
<category>Standard</category>
<standardcategorynodes>
<a/>
<b/>
</standardcategorynodes>
</parenttype>
<parenttype>
<category>Special</category>
<specialcategorynodes>
<c>
<d/>
<c/>
</specialcategorynodes>
</parenttype>
where the parent node type is the same, but depending on the value of the category node, subsequent nodes are different. I thought a good solution would be to have a xs:choice, where each choice has a fixed value for the category node and then the relevant subsequent nodes follow but I get a Unique Particle Attribution violation as both choices have the category node. Is there a solution for this type of situation or will i have to workaround it somehow?
Thanks very much, Matt
|
|
|
|
|
I have Xml File like the follwing :
<b><Students xmlns="http://tempuri.org/DemoFile.xsd">
<Student>
<RegNO>1220200054</RegNO>
<Name>Chetan Ranpariya</Name>
<Dept>IT</Dept>
<City>Ahmedabad</City>
</Student>
</Students>
and I had a .xsd file for that in which I set the datatype for
"RegNo" as "long" and set it as a primary key column.
Now problem is when ever I tried to ented text data int RegNo the error is given. It's Ok. But if I enter duplicate value in RegNo field then it does not give any error and accepts data.
So how can I make primary to work like in sql, and access.
Can any one help me?
Thanks in advance for help.
Chetan Ranpariya
|
|
|
|
|
I have a couple of xml files I'd like to create xsd schemas for. This is not so difficult but the problem is that the strcuture of the xml file (something I can't easily influence) is strange.
The files problem section look like this:
<applications>
<version>1.0</version>
<application name="Imager" custom="SlasHas AB">
<device Merge="Yes">
<section name="apsect dependency" default="false">
<key name="defaultImageType">.jpg</key>
<key name="imageHeight">128</key>
<key name="imageWidth">128</key>
<key name="imageColours">65536</key>
<key name="modelGroupName">X Model</key>
<key name="modelSeriesName">X</key>
<key name="modelNames">
<model>X1</model>
<model>7592597B-E087-4565-9BAC-596C096EBB2C</model>
<model>X2</model>
<model>523DC659-B6F8-4b38-8EEB-B19E7AC7F2E3</model></key>
<key name="aspectID">1:1</key>
<key name="transferMode">TCFILETRANSFER</key>
<key name="hidden">1</key>
<key name="defaultImageFolderName">\\</key>
</section>
</device>
</application>
</applications>
My problem is not that I can create a working schema. It is that I'd like to have restrictions on all key elements which I cannot figure out how to do since they are all of different types. For example
key name="defaultImageType" has a string as value and i'd like to have a restriction xs:enumeration value=".jpg | .bmp | .gif"
but I also want to have key name="imageHeight with type xs:positiveInteger and so on.
Is this possible, to have different types on elements with same name? Apparently the xml file works.
And if it is allowed how can I do the schema?
/Clatten
|
|
|
|
|
Hello, I'm trying to save into a xml file some rows that my programs generates, the number of lines to insert into the file is about 2000 and when I generates it, stops into the middle of a line without generation an exception. Anyone knows of such a problem? all the lines have the same structure and they're printed ok on console.
If u need I can paste the code, but I don't if it's too large the number of elements I try to insert.
Thanks
Paolo
ok.....was my fault, with a little more of patients I found that I was missing
xtw.close();
and so the flush of object was not written into file, now that all is ok, I continue playing with my new toy!
|
|
|
|
|
Hello,
I am reading the <item> nodes from a XML file and add them to a dataset.
When I display my dataset in a datagrid I always see the same record.
It's like the For loop is not moving from one item to the next one.
This is my code:
' Load RSS File
Dim news As New XmlDocument()
news.Load("http://www.domain.com/_rss/news.rss")
' Create Dataset
Dim dsNews As DataSet = New DataSet()
dsNews.Tables.Add
dsNews.Tables(0).Columns.Add("title", GetType(String))
dsNews.Tables(0).Columns.Add("description", GetType(String))
' Read Item Nodes
Dim items As XmlNodeList =
news.SelectNodes("/rss[@version='2.0']/channel/item")
For Each item As XmlNode In items
Dim row As DataRow = dsNews.Tables(0).NewRow()
row.Item("title") =
CType(news.SelectSingleNode("/rss[@version='2.0']/channel/item/title").InnerText,
String)
row.Item("description") =
CType(news.SelectSingleNode("/rss[@version='2.0']/channel/item/description").InnerText,
String)
dsNews.Tables(0).Rows.Add(row)
Next
Can someone tell me what is wrong?
Thank You,
Miguel
|
|
|
|
|
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
|
|
|
|