Strip the last 2 char in xml file

  • Thread starter Thread starter Mel
  • Start date Start date
M

Mel

Hello,
How do I strip the last to 2 characters? It is form a html page of
labels converted to xml by htmlagility pack, only some of the records, have
the hexadecimal character at the end.

NICEVILLE, FL 32578-0000P

NICEVILLE, FL 32578-0000E


Thanks
Mel
 
Sorry I must have been sleeping when I wrote this. Trying again;

How do I strip the last two characters on the following lines? It is from
an xml file of address labels. The file was made from loading a html page
in the htmlagility pack and saving to xml.

NICEVILLE, FL 32578-0000P

NICEVILLE, FL 32578-0000E
 
Mel said:
How do I strip the last two characters on the following lines? It is from
an xml file of address labels. The file was made from loading a html page
in the htmlagility pack and saving to xml.

NICEVILLE, FL 32578-0000P

NICEVILLE, FL 32578-0000E

StreamReader & StreamWriter, ReadLine + remove char if present + WriteLine.

Or XmlDocument, Load, iterate through doc and remove char where
presebt + Save.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top