File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 11using System . IO . Compression ;
22using System . Xml ;
33using System . Xml . Linq ;
4+ using Devlooped . Web ;
45
56namespace Devlooped . Epub ;
67
@@ -35,11 +36,8 @@ public XDocument Open()
3536 throw new InvalidArchiveException ( ThisAssembly . Strings . MissingContent ( Href ) ) ;
3637
3738 using var stream = entry . Open ( ) ;
38- using var reader = XmlReader
39- . Create ( stream , new XmlReaderSettings { DtdProcessing = DtdProcessing . Ignore } )
40- . IgnoreNamespaces ( ) ;
4139
42- return XDocument . Load ( reader ) ;
40+ return HtmlDocument . Load ( stream ) ;
4341 }
4442
4543 /// <summary>
Original file line number Diff line number Diff line change @@ -29,6 +29,19 @@ public void CanOpen()
2929 Assert . NotNull ( pub ) ;
3030 }
3131
32+ [ Fact ]
33+ public void CanReadContentFragments ( )
34+ {
35+ using var pub = Publication . Open ( @"Samples/CCyC_Comentado_Tomo_II.epub" ) ;
36+
37+ Assert . NotNull ( pub . Package . Navigation ) ;
38+
39+ foreach ( var nav in pub . Package . Navigation )
40+ {
41+ var content = nav . Open ( ) ;
42+ }
43+ }
44+
3245 [ Fact ]
3346 public void CanAccessPackageInformation ( )
3447 {
You can’t perform that action at this time.
0 commit comments