Hi.
Next code throws error “The namespace declaration attribute has an incorrect ‘namespaceURI’: ‘http://www.w3.org/2000/xmlns/’”:
Document document = new Document(“some file name”);
var taggedContent = document.TaggedContent;
StackTrace:
at System.Xml.XmlDocument.AddAttrXmlName(String prefix, String localName, String namespaceURI, IXmlSchemaInfo schemaInfo) in //src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs:line 246
at System.Xml.XmlDocument.CreateAttribute(String prefix, String localName, String namespaceURI) in //src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs:line 1077
at System.Xml.XmlDocument.CreateAttribute(String name) in //src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs:line 621
at System.Xml.XmlElement.SetAttribute(String name, String value) in //src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs:line 292
at #=zjQRU3Ao6xrQglQDRuDAyxDoJwXDnliF5fgby7_8=.#=zK0TKl6M=()
at #=zRur_uMF2pkzVB0ObnCEGKmOTmZX_fGcNN3L5eHU=.#=zO7BbkWdjmvny(XmlWriter #=z2SoVpeo=, #=znW6c6Kz1bkIt6JQavitBbpbULd53Eoll4VBbe7g= #=z4CBTcAA=)
at #=zRur_uMF2pkzVB0ObnCEGKmOTmZX_fGcNN3L5eHU=.#=zO7BbkWdjmvny(Stream #=zpCqxRiM=, Int32 #=zS9olONc=)
at #=zvtO6Ng$WpwYB54ImeHA3xachkgcINUx$g3YrQuY=.#=zAXS20pc=(#=zRur_uMF2pkzVB0ObnCEGKmOTmZX_fGcNN3L5eHU= #=znMMS7AE=, Boolean #=zzXFX2oqk_4XT)
at #=zvtO6Ng$WpwYB54ImeHA3xachkgcINUx$g3YrQuY=.#=z3eVHLp4ztRSz(#=zRur_uMF2pkzVB0ObnCEGKmOTmZX_fGcNN3L5eHU= #=zK1Y9$H4=)
at #=zuTuMyEuDuO0yqfG15EVOd7ocgYLG.#=z41mhV3jKGcJ1()
at #=zuTuMyEuDuO0yqfG15EVOd7ocgYLG…ctor(Document #=z_UAyEcE=)
at #=zHfMpHx8S3XPVBqRdjpgWwigKIRkX…ctor(Document #=z_UAyEcE=)
at Aspose.Pdf.Document.get_TaggedContent()
The error has occurred once on different files. Unfortunately it cannot be reproduced. Can you suggest any possible reasons?
Tech stack: Aspose.PDF 22.11.0, .Net 5
OS: CentOS 8