在vb.net中读取xml时,在文本内容中发现了无效字符错误

时间:2009-10-19 11:48:48

标签: xml

嗨朋友们希望所有人都做得好。我在vb.net中读取xml文件时遇到问题,即收到错误“文本内容中发现了无效字符”。我正在使用XmlDocument类加载和保存。我的xml文件如下:

<?xml version="1.0" encoding="UTF-8"?>
     <Job>
      <Job_ID>83795806</Job_ID> 
      <PositionID>61224782</PositionID> 
      <Title>Oracle Functional Consultant</Title> 
      <Summary><![CDATA[ Information Technology Emerging Technologies Analyst APS 5 PSS 055 - Canberra, ACT DIO requires a &#160;motivated person to work as part of a small team that provides our customers with strategic level assessments on the defence and security implications of the potential threats posed by emerging technology to Australia’s security. The successful applicant will require scientific tertiary qualifications &#183;
      ]]> 
    </Summary> 
      <DateActive>10/5/2009</DateActive> 
      <DateExpire>11/5/2009</DateExpire> 
      <DateUpdated>10/6/2009</DateUpdated> 
      <Country>xx</Country> 
      <State>xx</State> 
      <City>xx</City> 
      <PostalCode>00000</PostalCode> 
      <CompanyName>ABC Recruitment</CompanyName> 
        </Job>

PLS。帮助我找到解决方案。提前谢谢。

我的文件内容

<?xml version="1.0" encoding="UTF-8"?>
<Result>
<Jobs Found="123" Returned="25">
<Job ID="84039840" PositionID="61415257">
  <Title>SQL Server 2000/2005 DBA - xx</Title>
  <Summary><![CDATA[Ideally looking for a Strong SQL DBA with several years experience, who has worked both for Government and non-government companies, immediate start! Central Location Challenging role Immediate Start Our client is currently on the look out for a talented SQL DBA to join their ranks and assist with their clients demand. Working within a strong but relaxed culture, you&#39;ll find your ideas/skills put t]]></Summary>
  <Datexxive Date="2009-10-18T22:51:46-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T00:34:37-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 00:35:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Gemteq</CompanyName>

</Job>
<Job ID="84041280" PositionID="61416420">
  <Title>Systems Analyst  Billing Platforms</Title>
  <Summary><![CDATA[Up to $70 an hour ASAP Start 12 month contrxx The Billing Systems Analyst will be involved in maintaining the customers existing software and support new customer applications by providing Technical specifications, analysing the high level customer issues and proposing solutions while working closely with the Business Analyst and SQL developers to document the technical implementation of the cust]]></Summary>
  <Datexxive Date="2009-10-18T20:17:43-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T03:23:34-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 03:24:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Kelly Executive</CompanyName>

</Job>
<Job ID="84037994" PositionID="61413498">
  <Title>PreSales Security Engineer</Title>
  <Summary><![CDATA[Are you a client facing Security Consultant with business acumen? &#160; This is an incredible opportunity to work with a global iconic brand. &#160; Based in the heart of xx, you will be working hand in hand with others who are top in their respective fields to deliver the best solutions to clients. &#160; Work with the Sales Team to design, develop Proof of Concept for end clients within a supportive env]]></Summary>
  <Datexxive Date="2009-10-18T17:32:24-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-17T18:00:04-05:00">11/17/2009</DateExpires>
  <DateUpdated Date="2009-10-18 18:00:00">10/18/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Candle ICT</CompanyName>
 </Job>
<Job ID="84038542" PositionID="61413999">
  <Title>Calling C#.Net developers -contrxx role available with xx based federal agency</Title>
  <Summary><![CDATA[As an applications developer, you will be working within a large program that will significantly renovate and provide large new additions to the core operations system over the next five years. &#160; The systems applications environment is predominantly based on the Microsoft and Oracle platforms. &#160; Your principal responsibilities will include: &#160; Developing windows and web applications with associated]]></Summary>
  <Datexxive Date="2009-10-18T17:00:20-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-17T21:00:33-05:00">11/17/2009</DateExpires>
  <DateUpdated Date="2009-10-18 21:01:00">10/18/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Candle ICT</CompanyName>
</Job>
<Job ID="84039788" PositionID="61415206">
  <Title>Open Systems Storage Backup Administration</Title>
  <Summary><![CDATA[6 month extendable government contrxx Immediate Start Genuine resume builder Our Defence client has several large critical client systems running on Defence Computing Bureau storage support section platforms. They require an experienced Open Systems Storage backup administrator to support their fabric, disk and backup management services with a focus on Symantec Netbackup Administration. You will]]></Summary>
  <Datexxive Date="2009-10-18T17:55:23-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T00:33:31-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 00:34:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Macro Recruitment</CompanyName>
  <Salary>
    <Min Value="70000">70,000.00</Min>
    <Max Value="120000">120,000.00</Max>
    <Type ID="1">Per Year</Type>
    <Currency ID="4">xx</Currency>
  </Salary>

</Job>
<Job ID="84039910" PositionID="61415323">
  <Title>SAP Training Lead</Title>
  <Summary><![CDATA[Large Project!!!&#160;&#160;&#160; Great Team!!!&#160;&#160;&#160; City Location!!!&#160;&#160;&#160; &#160;&#160;&#160; Our client, a high profile Federal Government Department, currently requires an SAP focused Training Lead to assist in the delivery of a large SAP Project.&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; In this role the Training Lead will be responsible for delivering high level training expertise across an SAP based project. The day to day responsibilities of the role wil]]></Summary>
  <Datexxive Date="2009-10-18T17:10:21-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T00:54:34-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 00:55:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Greythorn</CompanyName>
 </Job>
<Job ID="84040394" PositionID="61415777">
  <Title>Senior Network Design Engineer - xx - c$110,000 - $130,000</Title>
  <Summary><![CDATA[Security clearance is highly desirable Supportive, flexible working environment First class training &amp; career development My Client is an xxn owned IT Service provider who has enjoyed solid growth over the past few years. They have an excellent business model and strong leadership in place ensuring they will continue to grow in 2009. They are now looking to add a Senior Network Design Engin]]></Summary>
  <Datexxive Date="2009-10-18T15:52:56-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T02:17:06-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 02:17:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Skill Quest</CompanyName>
  <Salary>
    <Min Value="90000">90,000.00</Min>
    <Max Value="120000">120,000.00</Max>
    <Type ID="1">Per Year</Type>
    <Currency ID="4">xx</Currency>
  </Salary>
</Job>
<Job ID="84038159" PositionID="61413644">
  <Title>Communications Technician</Title>
  <Summary><![CDATA[Permanent position Reputable private company Radio focus My client, a reputable private organisation is seeking a Communications Technician for a permanent role located in Queanbeyan. The successful Communications Technician will be responsible for the installation, maintenance, and repair of mobile radio, microwave radio, data, telephony and SCADA systems; including emergency response, project in]]></Summary>
  <Datexxive Date="2009-10-18T13:33:17-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-17T19:13:03-05:00">11/17/2009</DateExpires>
  <DateUpdated Date="2009-10-18 19:13:00">10/18/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Collective Resources</CompanyName>
</Job>
<Job ID="84039839" PositionID="61415256">
  <Title>SQL Server 2000/2005 DBA - xx</Title>
  <Summary><![CDATA[Ideally looking for a Strong SQL DBA with several years experience, who has worked both for Government and non-government companies, immediate start! Central Location Challenging role Immediate Start Our client is currently on the look out for a talented SQL DBA to join their ranks and assist with their clients demand. Working within a strong but relaxed culture, you&#39;ll find your ideas/skills put t]]></Summary>
  <Datexxive Date="2009-10-18T13:58:16-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T00:34:37-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 00:35:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Gemteq</CompanyName>
  <DisplayOptions />

</Job>
<Job ID="84039841" PositionID="61415258">
  <Title>SQL Server 2000/2005 DBA - xx</Title>
  <Summary><![CDATA[Ideally looking for a Strong SQL DBA with several years experience, who has worked both for Government and non-government companies, immediate start! Central Location Challenging role Immediate Start Our client is currently on the look out for a talented SQL DBA to join their ranks and assist with their clients demand. Working within a strong but relaxed culture, you&#39;ll find your ideas/skills put t]]></Summary>
  <Datexxive Date="2009-10-18T13:24:14-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T00:34:37-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 00:35:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Gemteq</CompanyName>
</Job>
<Job ID="84039959" PositionID="61415368">
  <Title>Project Manager</Title>
  <Summary><![CDATA[Contrxx till the end of June 2010 xxn Citizens only xx based Our client, which is a major government department seeks a personnel with significant experience as a Project Manager . This Project Manager position is based in xx and it is a contrxx till the end of Financial year (30th June 2010), with a start from January 2010 . To be considered for this Project Manager position,]]></Summary>
  <Datexxive Date="2009-10-18T13:26:27-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T01:13:34-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 01:14:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Collective Resources</CompanyName>
  </Job>
<Job ID="84039398" PositionID="61414819">
  <Title>Database System Developer</Title>
  <Summary><![CDATA[Our client is a leading telecommunications provider, offering excellent environment, great career opportunities and excellent remuneration. &#160; They are currently seeking an experienced Database System Developer to work with Designers, Project Managers, Business/Systems analysts and Testers to code and support standards compliant solutions. &#160; Apart from coding and supporting solutions, you are requi]]></Summary>
  <Datexxive Date="2009-10-18T12:47:52-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-18T00:00:33-05:00">11/18/2009</DateExpires>
  <DateUpdated Date="2009-10-19 01:01:00">10/19/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Candle ICT</CompanyName>
  <DisplayOptions />

</Job>
<Job ID="84038299" PositionID="61413769">
  <Title>Senior Server Engineer</Title>
  <Summary><![CDATA[Infrastructure Support &#160;&#160; Training Provided &#160;&#160; Opportunity for Growth and Career Progression &#160;&#160; &#160;&#160; Our client is a 100% xxn owned company that provides IT outsourcing, computer infrastructure, application development, systems integration and the provision of specialist technical services and support to 120 clients, in both the private and public sector. They are quickly growing seeking to a]]></Summary>
  <Datexxive Date="2009-10-18T08:26:37-05:00">10/18/2009</Datexxive>
  <DateExpires Date="2009-11-17T19:54:34-05:00">11/17/2009</DateExpires>
  <DateUpdated Date="2009-10-18 19:55:00">10/18/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Greythorn</CompanyName>
</Job>
<Job ID="84002468" PositionID="61385077">
  <Title>Information Technology</Title>
  <Summary><![CDATA[Information Technology Emerging Technologies Analyst APS 5 PSS 055 - xx, xx DIO requires a motivated person to work as part of a small team that provides our customers with strategic level assessments on the defence and security implications of the potential threats posed by emerging technology to xx’s security. The successful applicant will require scientific tertiary qualifications]]></Summary>
  <Datexxive Date="2009-10-15T23:59:00-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T23:59:00-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-16 00:03:00">10/16/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
  </Location>
  <CompanyName>Department of Defence</CompanyName>
  <DisplayOptions>0</DisplayOptions>

</Job>
<Job ID="84001931" PositionID="61384553">
  <Title>Business Analyst</Title>
  <Summary><![CDATA[Our client is looking for a&#160;Business Analyst who will be required to capture business requirements, document functional and technical specifications and collaboratively prepare logical design documentation. &#160; The required candidate must also be able to; &#160; manage the end-to-end process including scoping, analysing, documenting, communicating and managing the design, implementation and user acceptan]]></Summary>
  <Datexxive Date="2009-10-15T21:45:39-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T23:01:08-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 23:01:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Diversiti</CompanyName>
 </Job>
<Job ID="84003298" PositionID="61385668">
  <Title>Business Development Manager</Title>
  <Summary><![CDATA[Business development Manager required URGENTLY by this young national channel partner targeting SME corporate for mobile, fixed and data total solutions. With a head office in Sydney and a forecast for aggressive growth nationally with new shops and offices opening and a strong experienced leadership team. Due to rapid expansion a Business Development Manager position is available reporting to the]]></Summary>
  <Datexxive Date="2009-10-15T20:22:09-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-15T02:24:37-05:00">11/15/2009</DateExpires>
  <DateUpdated Date="2009-10-16 02:25:00">10/16/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Command Recruitment Group</CompanyName>
 </Job>
<Job ID="84002466" PositionID="61385075">
  <Title>Senior Disaster Recovery Specialist</Title>
  <Summary><![CDATA[Immediate Start!!!&#160;&#160;&#160; Woden Location!!!&#160;&#160;&#160; 2 month contrxx!!!&#160;&#160;&#160; &#160;&#160;&#160; Our client, a large Federal Government Agency, currently requires one Senior Disaster Recovery Specialist to undertake a short two month contrxx.&#160;&#160;&#160; &#160;&#160;&#160; In this role the DR Specialist will be responsible for undertaking the following tasks;&#160;&#160;&#160; &#160;&#160;&#160; Identify and document DR based business problems;&#160;&#160; Complete a technical statemen]]></Summary>
  <Datexxive Date="2009-10-15T20:35:06-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T23:57:04-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-18 19:55:00">10/18/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Greythorn</CompanyName>
</Job>
<Job ID="83999049" PositionID="61382094">
  <Title>Biztalk / Sharepoint Architect To Work In Fast Paced Environment $130,000</Title>
  <Summary><![CDATA[Join This Microsoft Gold Partner Leading Solution Provider Play A Pivotal Role In This Expanding Organisation Passionate, Innovative Solutions Driven Architect BTA IT is pleased to announce and invite applications for this Biztalk Solutions Architect role with a renowned professional services client. &#160; Due to expansion and continual demand of project work, my client is in need for a strong BizTalk]]></Summary>
  <Datexxive Date="2009-10-15T14:25:45-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T17:19:45-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 17:20:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>BTA IT</CompanyName>
  <Salary>
    <Min Value="120000">120,000.00</Min>
    <Max Value="150000">150,000.00</Max>
    <Type ID="1">Per Year</Type>
    <Currency ID="4">xx</Currency>
  </Salary>
</Job>
<Job ID="83999386" PositionID="61382347">
  <Title>Systems Administrator (EPMS)</Title>
  <Summary><![CDATA[Inner-south xx location &#160; Initial contrxx through until 30 June 2010 &#160; High profile Federal Government Department &#160; Our reputable Federal Government Department Client is seeking a skilled and experienced (Enterprise Project Management System) Systems Administrator to assist in the maintenance and development of project schedules using MS Project and EPMS Enterprise Resources. &#160; Your main co]]></Summary>
  <Datexxive Date="2009-10-15T10:28:19-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T17:57:34-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 17:58:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Greythorn</CompanyName>    
</Job>
<Job ID="84000267" PositionID="61383096">
  <Title>Senior VB/VB.Net Developer</Title>
  <Summary><![CDATA[3 Month Contrxx (possible Extension) Good Rates Immediate Start This position is technical in nature and&#160;our client&#160;is looking for a competent and professional VB.NET senior developer/designer applicants should possess a strong background in software development covering real production and large/complex systems experience, together with strong analytical and design skills. The resource will unde]]></Summary>
  <Datexxive Date="2009-10-15T09:33:03-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T19:26:57-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 19:27:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Hays Information Technology</CompanyName>
  </Job>
<Job ID="83983580" PositionID="61369947">
  <Title>Business Analyst</Title>
  <Summary><![CDATA[Contrxx through until June 30 2010 xxn Citizens xx Location My client, a Government Department in xx, is seeking a Business Analyst for a contrxx through until the end of June 2010. This is a great opportunity to capture business requirements, document functional and technical specifications and collaboratively prepare logical design documentation. As well as the above, the su]]></Summary>
  <Datexxive Date="2009-10-15T03:05:32-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T05:00:33-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 05:01:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Collective Resources</CompanyName>

</Job>
<Job ID="83983670" PositionID="61370033">
  <Title>VBA / Excel Developer - 3 month contrxx</Title>
  <Summary><![CDATA[3 month contrxx, Federal Government 3 days per week, or full time xx City 3 month contrxx, Federal Government 3 days per week, or full time xx City The Excel solution will allow business owners to extrxx and manipulate data from the corporate databases and present it using a number of pre-defined reports. The candidate will be a senior member of the project team to expand on the par]]></Summary>
  <Datexxive Date="2009-10-15T03:51:57-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T05:01:36-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 05:02:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Hudson</CompanyName>

</Job>
<Job ID="83983673" PositionID="61370034">
  <Title>Developer - JavaScript</Title>
  <Summary><![CDATA[xx based $50,000 - 70,000 + super Growth client, servicing Defence xx based $50,000 - 70,000 + super Growth client, servicing Defence Due to the continuing growth in demand for their products and services our client is seeking the skills of a Developer to join their team. Our client is seeking someone who can work in small teams to produce solutions for a growing client base. Additiona]]></Summary>
  <Datexxive Date="2009-10-15T01:11:15-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T05:01:36-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 05:02:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Hudson</CompanyName>      
</Job>
<Job ID="83983889" PositionID="61370237">
  <Title>Senior Server Engineer required for xx contrxx</Title>
  <Summary><![CDATA[Mandatory: Windows 2003 Server x86x64 administration Windows XP administration AD Group Policy Understanding of Trust&#39;s in a complicated SDLC environment Understanding of Firewalls requirements in a Multiple Realm environment. Understanding of XenApps and Citrix Experience working in a VMware Virtualised environment. Desired: EDRMS experience - use of or basic understanding around what is evolved T]]></Summary>
  <Datexxive Date="2009-10-15T00:59:31-05:00">10/15/2009</Datexxive>
  <DateExpires Date="2009-11-14T05:06:31-05:00">11/14/2009</DateExpires>
  <DateUpdated Date="2009-10-15 05:07:00">10/15/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Command Recruitment Group</CompanyName>

</Job>
<Job ID="83979143" PositionID="61366345">
  <Title>Mainframe Developer</Title>
  <Summary><![CDATA[Senior Mainframe Developer With TELON / COBOL Experience This is a great opportunity if you are an experienced&#160;Mainframe Developer with the following skills: TELON / COBOL, Cool:Gen, SAS If so then you will be pleased to hear that this position offers a minimum 12 month contrxx. You will be working in xx for&#160;a large government organisation. As part of this role you will be required to: Desi]]></Summary>
  <Datexxive Date="2009-10-14T20:08:41-05:00">10/14/2009</Datexxive>
  <DateExpires Date="2009-11-13T20:33:33-05:00">11/13/2009</DateExpires>
  <DateUpdated Date="2009-10-14 20:34:00">10/14/2009</DateUpdated>
  <Location>
    <Country>xx</Country>
    <State>xx</State>
    <City>xx</City>
    <PostalCode>xx</PostalCode>
  </Location>
  <CompanyName>Human Touch Resource Group</CompanyName>
  <Salary>
    <Max Value="30000">30,000.00</Max>
    <Type ID="1">Per Year</Type>
    <Currency ID="4">xx</Currency>
  </Salary>

</Job>
</Jobs></Result>

3 个答案:

答案 0 :(得分:3)

验证文件是否有效UTF-8。您可以通过以下方式读取文件来执行此操作:

File.ReadAllText(@"c:\path\to\file.xml", Encoding.UTF8)

如果失败并出现类似的错误消息,则问题很明显:XML文件声称是UTF8编码,但实际上并非如此。

另请注意,您从文本编辑器中复制粘贴了XML文件的内容,但文本编辑器将文件打开为latin1编码而不是UTF-8。这导致正确的UTF8编码文本Australia’s被错误地解码为Australia’s。您的文本编辑器可能已经退回到latin1,因为文件中存在无效(对于UTF8)字节序列其他

编辑:我复制了XML,将其保存为latin1,然后再次将文件打开为UTF8。我的文本编辑器警告我,在ID =“84002468”的Job元素摘要中有一个无效的字节序列。

答案 1 :(得分:0)

我可以说你错过了一个处理指令;类似的东西:

<?xml version="1.0" encoding="XXXXX"?>

XXXXX是哪种编码格式适合您的“Australia’s”字符

答案 2 :(得分:0)

我正在将XML从本地移动到服务器,但我无法复制它,因此我将内容复制到记事本并保存。 事情是我没有保存为UTF-8格式,因此,只需打开文件,然后使用您需要的格式重新保存。