Get xml node value and offset in c#

Playa82

New Member
I parse a general string which might contain xml table definition. I should parse the table and also get the offset of its values related to the beginning of the string. For example:\[code\]This is general string to be analyzed.<table> <row> <cell>John</cell> <cell>Jenifer</cell> <row> <table> More free text to analyze.\[/code\]I should get the values: John and Jenifer and also get their offset from the start of the string. John offset is 53 and Jenifer offset is 70 (more or less). Also I should get the offset of the \[code\]<table>\[/code\] tag (39 in the example).It's possible to parse the xml using XElement, but it has no information about the offset. With regular expression which gives the offset information it's hard to parse such structure, which might only contain: \[code\]<table/>\[/code\]Does anyone has the idea how to do that?Thanks in advance...
 
Back
Top