xml

  • Thread starter Thread starter ichor
  • Start date Start date
I

ichor

hi,

I have a table in sql 2000 that has a few fields. one of which is
datecreated.
I have an xml document that i created from this table.


i need to find out the max(created date) from this xml file using c#.
how do i do this?
do i need to use xpath?
or do i need to use one of the readers?

thanx
 
If i understand correctly, you will need to use xpath

e.g.

<tablename><datecreated>DATE IN HERE</datecreated></tablename

then use = assuming you already have the XmlDocumen
XmlNode m_objNode = m_objXmlDoc.DocumentElement.SelectSingleNode("datecreated")
string strDateCreated = m_objXmlDoc.InnerText

Cheers
Jonathan Rucker

----- ichor wrote: ----

hi

I have a table in sql 2000 that has a few fields. one of which i
datecreated
I have an xml document that i created from this table


i need to find out the max(created date) from this xml file using c#
how do i do this
do i need to use xpath
or do i need to use one of the readers

than
 
Correction - Should be -

if(m_objNode != null

string strDateCreated = m_objNode.InnerText


Cheers
Jonathan Rucker

----- Jonathan Ruckert wrote: ----

If i understand correctly, you will need to use xpath

e.g.

<tablename><datecreated>DATE IN HERE</datecreated></tablename

then use = assuming you already have the XmlDocumen
XmlNode m_objNode = m_objXmlDoc.DocumentElement.SelectSingleNode("datecreated")
string strDateCreated = m_objXmlDoc.InnerText

Cheers
Jonathan Rucker

----- ichor wrote: ----

hi

I have a table in sql 2000 that has a few fields. one of which i
datecreated
I have an xml document that i created from this table


i need to find out the max(created date) from this xml file using c#
how do i do this
do i need to use xpath
or do i need to use one of the readers

than
 
Back
Top