I have a VERY annoying string problem. I am importing an XML file and trying to read whats in between the tags. this is the last tag I have left and it doesn't make sense. This is a small clip of what is read from the file
This is the code I'm using to get whats between the dcterms:created tagsCode:<cp:revision>1</cp:revision> <dcterms:created xsi:type="dcterms:W3CDTF">2009-03-18T16:03:00Z</dcterms:created> <dcterms:modified xsi:type="dcterms:W3CDTF">2009-03-18T16:45:00Z</dcterms:modified> </cp:coreProperties>
but I get all this extra.Code:tagStart = "<dcterms:created" tagEnd = "</dcterms:created" x = input.IndexOf(tagStart) y = input.IndexOf(tagEnd) If x = -1 Or y = -1 Then MessageBox.Show("iFailed") Info.datecreated = input.Substring(x + 43, y - x) Info.timecreated = input.Substring(x + 54, y - x)
Why do i get so much extra stuff.Code:2009-03-18T16:03:00Z</dcterms:created><dcterms:modified xsi:typ 16:03:00Z</dcterms:created><dcterms:modified xsi:type="dcterms:
P.S. someone pointed me at the System.XML and i looked at it but im not entirely sure how to use it. I am still very new at programming. plus I have gotten so far doing it my way




Reply With Quote