私の言語はasp.netです。そして、Linq を使用して xml ファイルを解析します。しかし、このxmlファイルには名前空間が設定されています。xml ファイルをロードする前に。xml 名前空間をインポートしようとしています。しかし、まだxmlを正しく解析できません。
Imports <xmlns="abc">
<html>
<head>
<title>Do-Life</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../../img/css.css" rel="stylesheet" type="text/css">
<script runat="server">
Sub Page_Load(ByVal sender as Object, ByVal e as System.EventArgs)
If not isPostBack Then
....
Dim TYPINFO As XElement = XElement.Load(server.MapPath(filename))
Dim tinfos As IEnumerable(Of XElement)
tinfos = From tf In TYPINFO...<typhinfo> Select tf
....
....
xml ファイル:
<?xml version="1.0" encoding="UTF-8"?>
<cwbtyphfcst xmlns="abc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cwb.wfc.typhoonfcstCE/namespace typhooninfor.xsd">
<announcement>
...