Check if object's property is empty

25 ビュー (過去 30 日間)
Monika Jaskolka
Monika Jaskolka 2022 年 2 月 20 日
回答済み: Fangjun Jiang 2022 年 3 月 23 日
I have an xmlcomp.Edits object that was created when performing a comparison via the command
root = slxmlcomp.compare(...)
In this case, an xmlcomp.Edits object was created (see attached file) but all properties are empty. However, I don't know how to check if the properties are empty so I can catch the error that occurs when I try to access the properties. Is there a command to use when the object's properties are empty?
  14 件のコメント
Adam Danz
Adam Danz 2022 年 3 月 23 日
I second Rik's advice.

サインインしてコメントする。

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2022 年 3 月 23 日
Might this help?
>> EmptyRoot=xmlcomp.Edits('')
EmptyRoot =
Edits with no properties.
>> isequal(root,EmptyRoot)
ans =
logical
1
>> isequal(root2,EmptyRoot)
ans =
logical
0

カテゴリ

Find more on Argument Definitions in Help Center and File Exchange

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by