diff --git a/MyHosListener/TestCode.xaml.cs b/MyHosListener/TestCode.xaml.cs index 4a8e718..037ea07 100755 --- a/MyHosListener/TestCode.xaml.cs +++ b/MyHosListener/TestCode.xaml.cs @@ -284,11 +284,9 @@ namespace MyHosListener } - // 17 获取 item[@root='2.16.156.10011.0.9.1.64']../../name/item/part + // 17 获取 wholeOrganization/name/item/part 作为病区名称 var areaName = xdoc - .Descendants(ns + "item") - .FirstOrDefault(x => (string)x.Attribute("root") == "2.16.156.10011.0.9.1.64") - ?.Ancestors(ns + "location") + .Descendants(ns + "wholeOrganization") .Descendants(ns + "name") .Descendants(ns + "item") .Descendants(ns + "part") diff --git a/MyHosListener/common/listener/CI0047Listener.cs b/MyHosListener/common/listener/CI0047Listener.cs index 629f11c..7cda0c7 100755 --- a/MyHosListener/common/listener/CI0047Listener.cs +++ b/MyHosListener/common/listener/CI0047Listener.cs @@ -278,11 +278,9 @@ namespace MyHosListener.common.listener } - // 17 获取 item[@root='2.16.156.10011.0.9.1.64']../../name/item/part + // 17 获取 wholeOrganization/name/item/part 作为病区名称 var areaName = xdoc - .Descendants(ns + "item") - .FirstOrDefault(x => (string)x.Attribute("root") == "2.16.156.10011.0.9.1.64") - ?.Ancestors(ns + "location") + .Descendants(ns + "wholeOrganization") .Descendants(ns + "name") .Descendants(ns + "item") .Descendants(ns + "part")