using HtmlAgilityPack how to load encoded html string -
i working on converting html string pdf. using expertpdf process.
but int process have clean html string , pass cleaned html string library create pdf.
in cleaning process first step remove unwanted html tags (some thing removing tags blacklist. list created me.). remove unwanted tags using htmlagilitypack parse html string , remove nodes
second step auto close knows tags if opened .when load html string using htmlagilitypack auto closes tags good. have come across problem here. issue when there text "reading < 5 go , visit doctor". less symbol treats start of tag , close down line.
for example : below html
> <p style="margin-top: 5px; margin-bottom: 5px; line-height: 16.9px; > background-color: #ffffff;">1. full evaluation , management of > acute coronary syndrome, st-elevation , non-st-elevation myocardial > infarction beyond scope of soc tele-intensivist coverage. 2. > cardiology consultation should recommended in cases of > suspected acute coronary syndrome or myocardial infarction 3. however, > 1 of these syndromes suspected, reasonable recommend > starting therapy asa, beta-blockers, nitrates, , morphine > sulfate. 4. in addition, full dose anticoagulation > anticoagulation (e.g. unfractionated heparin, enoxaparin, or > fondaparinux), second antiplatelet agent (e.g. clopidegrol) , > initiation of statin therapy (atorvastatin 80 mg orally daily) should > considered 5. patients heart failure or ejection fraction > < 40%, ace-inhibitors (or arb’s if history of ace-inhibitors > intolerance) should considered. 6. other more routine options > listed below.</p>
after using htmlagilitypack , load above html , htmldocument node have outterxml below
> <p style="margin-top: 5px; margin-bottom: 5px; line-height: 16.9px; > background-color: #ffffff;">1. full evaluation , management of > acute coronary syndrome, st-elevation , non-st-elevation myocardial > infarction beyond scope of soc tele-intensivist coverage. 2. > cardiology consultation should recommended in cases of > suspected acute coronary syndrome or myocardial infarction 3. however, > 1 of these syndromes suspected, reasonable recommend > starting therapy asa, beta-blockers, nitrates, , morphine > sulfate. 4. in addition, full dose anticoagulation > anticoagulation (e.g. unfractionated heparin, enoxaparin, or > fondaparinux), second antiplatelet agent (e.g. clopidegrol) , > initiation of statin therapy (atorvastatin 80 mg orally daily) should > considered 5. patients heart failure or ejection fraction > < 40%,="" ace-inhibitors="" (or="" arb’s="" if="" history="" of="" > ace-inhibitors="" intolerance)="" should="" be="" considered.="" 6.="" > other="" more="" routine="" options="" are="" listed=""></p>
treating < 40% tag , closes @ end , marking inbetween text attributes.
can please tell me have in order load string html document , don't treat < starting tag. there way me load document encoded text instead od plain string text ?
thanks, raj.
Comments
Post a Comment