XAMARIN表单项目上的System

XAMARIN表单项目上的System

本文介绍了XAMARIN表单项目上的System.XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用XmlDocument类**和** XmlDocument .Load(..)函数在XAMARIN的可移植项目中使用Visual Studio社区的Forms便携式解决方案.

I am trying to use XmlDocument class **and **XmlDocument .Load(..) functionon the Portable Project of XAMARIN.Forms Portable solution with visual studio community.

编译器说找不到类型或名称空间名称'XmlDocument'(您是否缺少using指令或程序集引用?"

The compiler says that "The type or namespace name 'XmlDocument' could not be found (are you missing a using directive or an assembly reference?"

如果我进入引用",则不允许我添加System.XML命名空间(不存在);如果我浏览文件并转到"system.xml.dll",则表示无法添加该文件,因为构建系统已经自动引用了此组件.

If i go in References it don't allow me to add the System.XML namespace (there is no) and if i browse file and go to system.xml.dll it says me that the file could not be added because this component is already automatically referenced by build system.

我可以做什么来使用该类?

what i can to do to use the class??

注意:在.Droid和.IOS项目中,有一个对System.xml的引用,在那些项目中,我可以使用XmlDocument类.

NOTE:in .Droid and .IOS project there is a referenc to System.xml and in those projects I can use XmlDocument class.

推荐答案

PCL不支持XmlDocument.您可以改用System.Xml.Linq.XDocument.

PCL doesn't support XmlDocument. You can use System.Xml.Linq.XDocument instead.

这篇关于XAMARIN表单项目上的System.XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 11:56