[erlang-questions] xmerl_scan results question
Wes James
comptekki@REDACTED
Tue Feb 7 17:18:35 CET 2012
From this file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Installed</key>
<true/>
</dict>
</plist>
I ran xmerl_scan("t.plist").
and get
rp(xmerl_scan:file("t.plist")).
{{xmlElement,plist,plist,[],
{xmlNamespace,[],[]},
[],1,
[{xmlAttribute,version,[],[],[],
[{plist,1}],
1,[],"1.0",false}],
[{xmlText,[{plist,1}],1,[],"\n",text},
{xmlElement,dict,dict,[],
{xmlNamespace,[],[]},
[{plist,1}],
2,[],
[{xmlText,[{dict,2},{plist,1}],1,[],"\n\t",text},
{xmlElement,key,key,[],
{xmlNamespace,[],[]},
[{dict,2},{plist,1}],
2,[],
[{xmlText,[{key,2},{dict,2},{plist,1}],
1,[],"Installed",text}],
[],".",undeclared},
{xmlText,[{dict,2},{plist,1}],3,[],"\n\t",text},
{xmlElement,true,true,[],
{xmlNamespace,[],[]},
[{dict,2},{plist,1}],
4,[],[],[],".",undeclared},
{xmlText,[{dict,2},{plist,1}],5,[],"\n",text}],
[],".",undeclared},
{xmlText,[{plist,1}],3,[],"\n",text}],
[],".",undeclared},
[]}
ok
I am wondering why, based on the xmerl.hrl file that there is no
output for xmlDecl. Isn't it the 1st line of the plist/xml file an
xmlDecl? What about the second line, i.e. DOCTYPE line?
Thanks,
Wes
More information about the erlang-questions
mailing list