我無法解析使用jQuery這個XML文件:XML解析與jQuery
<?xml version="1.0" encoding="utf-8"?>
<?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:BOT-Memos:-myXSD-2011-07-13T14-29-57" solutionVersion="1.0.0.27" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://sharept03sb1/BOT/BOT%20Memos/Forms/template.xsn"?>
<?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.3"?>
<my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2011-07-13T14:29:57" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-US">
<my:content>
<my:title>Hello</my:title>
<my:description><html xmlns="http://www.w3.org/1999/xhtml" xml:space="preserve"><div>How are you?</div></html></my:description>
<my:memo xsi:nil="true"></my:memo>
<my:group>
<pc:Person xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"><pc:DisplayName>Johnny Doe</pc:DisplayName><pc:AccountId>ADMIN\fakeadminuser</pc:AccountId><pc:AccountType>User</pc:AccountType></pc:Person></my:group>
<my:meetingDate></my:meetingDate>
<my:addAttachments>
<my:attachments>
<my:attachment xsi:nil="true"></my:attachment>
</my:attachments>
</my:addAttachments>
<my:upload></my:upload>
</my:content>
</my:myFields>
我想讀my:title
節點,但我有沒有運氣。這是我用來解析它的特定行。
$.get('target.xml', function(data){
alert($(data).find("my:memo").text());
});
任何想法?