Project

Profile

Help

Bug #4141

closed

'Serializer' does not contain a constructor that takes 0 arguments

Added by Pavel Sekret over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
.NET API
Sprint/Milestone:
Start date:
2019-02-20
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description


Files

saxon_api_serializer_bug.png (11.1 KB) saxon_api_serializer_bug.png Pavel Sekret, 2019-02-20 14:14
Actions #1

Updated by Michael Kay over 5 years ago

This was a change that we consciously made in 9.9. The same change was made on the Java side in 9.8. To create a Serializer, please use the factory method Processor.NewSerializer(). We made the change on the Java side because we were getting a lot of problems due to people creating a serializer and not connecting it to a Processor. On the .NET side, the change was necessitated because we have been moving towards the .NET classes in Saxon.Api being a thin veneer over the corresponding classes in the Java s9api package; this helps us to ensure consistency of the two, and to achieve better test coverage.

Actions #2

Updated by Pavel Sekret over 5 years ago

Thank you for your answer, Michael. It's working :)

Actions #3

Updated by Michael Kay over 5 years ago

  • Status changed from New to Closed
Actions #4

Updated by Stephan Bussing about 5 years ago

This item is already 7 months old, but I still got this problem. I use Saxon9he-api, and I too get this error and I don't see the NewSerializer() method.

The version I use is 9.9.1.5 in .NET.

What am I missing?

Actions #5

Updated by O'Neil Delpratt about 5 years ago

Hi, as mentioned in comment #1 the NewSerializer() method is in the Saxon.Api.Processor class

Actions #6

Updated by Stephan Bussing about 5 years ago

Thanks for the reply, but I don't see the NewSerializer() method in the Processor class either. Saxon.Api.Processor.NewSerializer(); throws The type name 'NewSerializer' does not exist in the type 'Processor'. So I clearly do something wrong.

Actions #7

Updated by O'Neil Delpratt about 5 years ago

Have you got an older version of Saxon .NET installed or in the GAC?

Actions #8

Updated by Stephan Bussing about 5 years ago

Oke, solved. I didn't know it was a static method

Saxon.Api.Processor clsProcessor = new Processor(); var serializer = clsProcessor.NewSerializer();

Thanks for the help

Please register to edit this issue

Also available in: Atom PDF