Click here to Skip to main content
15,914,165 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralXML As Database Pin
Gaurang Desai17-Jun-05 22:45
Gaurang Desai17-Jun-05 22:45 
GeneralRe: XML As Database Pin
Ahmed Galal22-Jun-05 12:57
Ahmed Galal22-Jun-05 12:57 
Generalsetting the parameter value based on condition Pin
D.Sridhar17-Jun-05 10:38
D.Sridhar17-Jun-05 10:38 
GeneralSuitability of XML Pin
Anonymous17-Jun-05 5:50
Anonymous17-Jun-05 5:50 
GeneralRe: Suitability of XML Pin
DavidNohejl17-Jun-05 5:58
DavidNohejl17-Jun-05 5:58 
QuestionHow to improve my code? Thank You. Pin
shapper17-Jun-05 5:31
shapper17-Jun-05 5:31 
Generalcreating nested comparison through the xml property Pin
Member 205376617-Jun-05 4:20
Member 205376617-Jun-05 4:20 
QuestionHow to format this date? Pin
shapper16-Jun-05 14:01
shapper16-Jun-05 14:01 
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
AnswerRe: How to format this date? Pin
Christian Graus16-Jun-05 14:09
protectorChristian Graus16-Jun-05 14:09 
GeneralRe: How to format this date? Pin
shapper16-Jun-05 14:32
shapper16-Jun-05 14:32 
GeneralRe: How to format this date? Pin
Christian Graus16-Jun-05 14:36
protectorChristian Graus16-Jun-05 14:36 
GeneralHelp how to show this xml file in dataGrid Pin
manojsoni_dims16-Jun-05 2:50
manojsoni_dims16-Jun-05 2:50 
GeneralHelp I can't show the XML IN DATAGRID Pin
manojsoni_dims16-Jun-05 2:43
manojsoni_dims16-Jun-05 2:43 
GeneralMSXML2::IXMLDOMDocument::save a xml doc Pin
Saurabh_Delhi13-Jun-05 17:24
Saurabh_Delhi13-Jun-05 17:24 
GeneralXML &gt; Dataset. Please, I need help. Thank You. Pin
shapper13-Jun-05 13:21
shapper13-Jun-05 13:21 
QuestionHow to get nodes and place data into dataset? Pin
shapper13-Jun-05 8:04
shapper13-Jun-05 8:04 
GeneralLittle Problem in XML and ASP based project Pin
eshban28410-Jun-05 9:39
eshban28410-Jun-05 9:39 
GeneralPlease Help: XSLT transformation problem with namespaces Pin
Member 169700910-Jun-05 8:32
Member 169700910-Jun-05 8:32 
GeneralRe: Please Help: XSLT transformation problem with namespaces Pin
DavidNohejl10-Jun-05 9:02
DavidNohejl10-Jun-05 9:02 
GeneralGet XmlSchemaElement from XmlSchema by ID Pin
El'Cachubrey9-Jun-05 23:18
El'Cachubrey9-Jun-05 23:18 
QuestionWhy this error when using XML data? Pin
shapper9-Jun-05 15:43
shapper9-Jun-05 15:43 
AnswerRe: Why this error when using XML data? Pin
shapper9-Jun-05 15:44
shapper9-Jun-05 15:44 
AnswerRe: Why this error when using XML data? Pin
Christian Graus9-Jun-05 15:47
protectorChristian Graus9-Jun-05 15:47 
QuestionImplementation of XML (.NET 1.1) and RemoveChild() - is it a bug ? Pin
lkrzanik9-Jun-05 5:27
lkrzanik9-Jun-05 5:27 
QuestionXML and ASP.NET. How to set this? Pin
shapper9-Jun-05 5:03
shapper9-Jun-05 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.