diff options
| author | Edward Barnard | 2015-08-10 23:48:12 +0100 |
|---|---|---|
| committer | Edward Barnard | 2015-08-10 23:48:12 +0100 |
| commit | e1889668d9e077392d9172691d7530c7b2de5abf (patch) | |
| tree | 6c305a610dd62f44c8deec29a3e61cc857a4ff9d /src/xml.rs | |
| parent | 2d549c343a9f07a751e9a7b537c3c2166168ff06 (diff) | |
| download | rust-plist-e1889668d9e077392d9172691d7530c7b2de5abf.tar.bz2 | |
Add binary plist support
Diffstat (limited to 'src/xml.rs')
| -rw-r--r-- | src/xml.rs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -49,7 +49,7 @@ impl<R: Read> Iterator for StreamingParser<R> { "plist" => (), "array" => return Some(PlistEvent::StartArray), "dict" => return Some(PlistEvent::StartDictionary), - "key" => return Some(self.read_content(|s| PlistEvent::DictionaryKey(s))), + "key" => return Some(self.read_content(|s| PlistEvent::StringValue(s))), "true" => return Some(PlistEvent::BooleanValue(true)), "false" => return Some(PlistEvent::BooleanValue(false)), "data" => return Some(self.read_content(|s| { @@ -114,18 +114,18 @@ mod tests { let comparison = &[ StartDictionary, - DictionaryKey("Author".to_owned()), + StringValue("Author".to_owned()), StringValue("William Shakespeare".to_owned()), - DictionaryKey("Lines".to_owned()), + StringValue("Lines".to_owned()), StartArray, StringValue("It is a tale told by an idiot,".to_owned()), StringValue("Full of sound and fury, signifying nothing.".to_owned()), EndArray, - DictionaryKey("Birthdate".to_owned()), + StringValue("Birthdate".to_owned()), IntegerValue(1564), - DictionaryKey("Height".to_owned()), + StringValue("Height".to_owned()), RealValue(1.60), - DictionaryKey("Data".to_owned()), + StringValue("Data".to_owned()), DataValue(vec![0, 0, 0, 190, 0, 0, 0, 3, 0, 0, 0, 30, 0, 0, 0]), EndDictionary ]; |
