parse XML to object
hi there,when i use
my class file like this:
{ Property Data As list Of PAT(XMLPROJECTION = "ELEMENT"); Parameter XMLIGNOREINVALIDTAG = 1; Parameter XMLIGNORENULL = 1; Parameter XMLNAME = "DATALIST"; }
{ Property CSRQ As %Date; Property CYZZDBM As %String(MAXLEN = "", TRUNCATE = 1); Property CYZZDMC As %String(MAXLEN = "", TRUNCATE = 1); Storage Default
{
<Data name="PATDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>CSRQ</Value>
</Value>
<Value name="3">
<Value>CYZZDBM</Value>
</Value>
<Value name="4">
<Value>CYZZDMC</Value>
</Value>
</Data>
<DataLocation>^M.PATD</DataLocation>
<DefaultData>PATDefaultData</DefaultData>
<IdLocation>^M.PATD</IdLocation>
<IndexLocation>^M.PATI</IndexLocation>
<StreamLocation>^M.PATS</StreamLocation>
<Type>%Library.CacheStorage</Type>
} }
Comments
Please check the documentation here regarding the IgnoreNull property of the reader.
thks,i got it!
Optionally, instead of using IgnoreNull property of the reader, add to your M.PAT class: