Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xml content inside <title> tag not parsed #315

Closed
apis-bulgaria opened this issue Jul 12, 2019 · 2 comments
Closed

Xml content inside <title> tag not parsed #315

apis-bulgaria opened this issue Jul 12, 2019 · 2 comments
Assignees

Comments

@apis-bulgaria
Copy link

apis-bulgaria commented Jul 12, 2019

Description

Hello, I am using HAP to parse custom xml (not actual html).
I've noticed that the latest versions can't parse the content in title tag - the content is parsed as HtmlTextNode.

Example code:

var htmlDocumnet = new HtmlDocument();
htmlDocumnet.LoadHtml("<bodyType> <title normalized-num=\"4\"> <num>ДЯЛ ЧЕТВЪРТИ</num> <heading>ПРИЛОЖИМ ЗАКОН</heading> </title> </bodyType>");

Expanding the DOM you will see that the child node of the <title> tag is single HtmlTextNode, where in previous versions the <num> and <heading> are parsed as child nodes.

The issue is not present in HAP 1.11.3.
In releases 1.11.7 and 1.11.8 there is a fixed issue which i think may be related

Further technical details

  • HAP version: 1.11.9
  • NET version (net471):
@JonathanMagnan JonathanMagnan self-assigned this Jul 12, 2019
@JonathanMagnan
Copy link
Member

JonathanMagnan commented Jul 12, 2019

Hello @apis-bulgaria ,

I'm not sure but I believe it now work as intended.

If you put this code in an html file and open it, you will see the title is <num>ДЯЛ ЧЕТВЪРТИ</num> <heading>ПРИЛОЖИМ ЗАКОН</heading> so this is indeed a text node. the num and heading are not child nodes but part of the text.

Best Regards,

Jonathan


Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval FunctionSQL Eval Function

@apis-bulgaria
Copy link
Author

Okay, thanks for the info.
I will use older version of HAP for now and at some point will try to migrate to System.Xml.Linq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants