簡體   English   中英

XmlDocument.Loadxml System.Xml.XmlException:名稱不能以“ 8”字符開頭-imageglue中的xml

[英]XmlDocument.Loadxml System.Xml.XmlException: Name cannot begin with the '8' character - xml from imageglue

我正在使用ImageGlue從圖像讀取Exif數據。 ImageGlue成功獲取exif數據並返回xml字符串。 當我嘗試使用XMLDocument加載xml字符串時,它將引發錯誤:

名稱不能以“ 8”字符開頭。

我知道xml的哪一部分導致了錯誤,但是我不知道這是xml還是試圖加載的xmldocument對象的問題。 xml下面,導致錯誤的標記是最后一個:Industry,Inc。它不喜歡“ 8298”,如果我將其刪除,則可以正常工作。 是ImageGlue的問題無法從Exif生成正確的xml,還是XmlDocument對象(C#)無法正確讀取它...?

<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:exif=\"http://ns.adobe.com/exif/1.0/#\">
<rdf:Description>
<dc:date>2013-10-17T14-08-19Z</dc:date>
<dc:type>image</dc:type>
<dc:format>image/jpeg</dc:format>
<dc:source>Photo</dc:source>
<exif:ImageWidth>4368 pixels</exif:ImageWidth>    
<exif:ImageLength>2912 pixels</exif:ImageLength>    
<exif:BitsPerSample>8,8,8</exif:BitsPerSample>  
<exif:Compression>6</exif:Compression>   
<exif:PhotometricInterpretation>2</exif:PhotometricInterpretation>    
<exif:Model>Canon EOS 5D</exif:Model>    
<exif:Orientation>Normal</exif:Orientation>   
<exif:SamplesPerPixel>3</exif:SamplesPerPixel>    
<exif:XResolution>72 pixels per inch</exif:XResolution>    
<exif:YResolution>72 pixels per inch</exif:YResolution>    
<exif:ResolutionUnit>inch</exif:ResolutionUnit>    
<exif:Software>Adobe Photoshop CS5 Windows</exif:Software>    
<exif:DateTime>2013:10:16 10:42:48</exif:DateTime>    
<exif:Artist>bobbi </exif:Artist>    
<exif:ThumbnailOffset>838</exif:ThumbnailOffset> 
<exif:ThumbnailLength>6049</exif:ThumbnailLength>
<exif:Tag 8298>Industries, Inc.</exif:Tag 8298>

那是無效的XML-它是ImageGlue無法生成正確的XML。 它正在嘗試使用XML標記名稱“ Tag 8298”,但是空格不能在其中工作,這意味着8298被解釋為屬性名稱,不能以數字開頭。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM