2013-09-05 4 views
1

привет, мой вопрос довольно прост в том, что как анализировать XML, содержащие HTML-теги, такие как id, br, code, href, Anchor и многие другие. теперь я использую XMLReader для получения диктатора, но его не удается преобразовать из-за тега. Я уверен, потому что я тестирую его с помощью простого XML без тега html.XML-строка с HTML-тегами

здесь Примеры XML

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type="text/xsl"?> 
<document xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 http://www.accessdata.fda.gov/spl/schema/spl.xsd"> 
    <id root="fdd1fa5e-9dbf-4951-a8e9-33d06e05bdba"/> 
<code code="34391-3" codeSystem="2.16.840.1.113883.6.1" displayName="HUMAN PRESCRIPTION DRUG LABEL"/> 
<title>WELLBUTRIN XL<sup>®</sup> 
<br/>(bupropion hydrochloride extended-release tablets)</title> 
<effectiveTime value="20101201"/> 
<setId root="fdd1fa5e-9dbf-4951-a8e9-33d06e05bdba"/> 
<versionNumber value="1"/> 
<author> 
    <time/> 
    <assignedEntity> 
    <representedOrganization> 
     <id extension="118802834" root="1.3.6.1.4.1.519.1"/> 
     <name>Rebel Distributors Corp</name> 
     <assignedEntity> 
      <assignedOrganization> 
       <assignedEntity> 
       <assignedOrganization> 
        <id extension="118802834" root="1.3.6.1.4.1.519.1"/> 
        <name>Rebel Distributors Corp</name> 
       </assignedOrganization> 
       <performance> 
        <actDefinition> 
         <code code="C73607" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="RELABEL"/> 
        </actDefinition> 
       </performance> 
       <performance> 
        <actDefinition> 
         <code code="C73606" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="REPACK"/> 
        </actDefinition> 
       </performance> 
       </assignedEntity> 
      </assignedOrganization> 
     </assignedEntity> 
     </representedOrganization> 
    </assignedEntity> 
</author> 
<component> 


<section ID="i4i_pharmacokinetics_id_64f18136-4148-40b6-bdc1-5a836f89badf"> 
       <id root="b72d6d1f-ba84-4360-b6d2-356e2659d444"/> 
       <code codeSystem="2.16.840.1.113883.6.1" code="43682-4" displayName="PHARMACOKINETICS SECTION"/> 
       <text> 
        <paragraph> 
         <content styleCode="bold">Pharmacokinetics: </content>Bupropion is a racemic mixture. The pharmacologic activity and pharmacokinetics of the individual enantiomers have not been studied. The mean elimination half-life (±SD) of bupropion after chronic dosing is 21 (±9) hours, and steady-state plasma concentrations of bupropion are reached within 8 days.</paragraph> 
        <paragraph>In a study comparing 14-day dosing with WELLBUTRIN XL 300 mg once daily to the immediate-release formulation of bupropion at 100 mg 3 times daily, equivalence was demonstrated for peak plasma concentration and area under the curve for bupropion and the 3 metabolites (hydroxybupropion, threohydrobupropion, and erythrohydrobupropion). Additionally, in a study comparing 14-day dosing with WELLBUTRIN XL 300 mg once daily to the sustained-release formulation of bupropion at 150 mg 2 times daily, equivalence was demonstrated for peak plasma concentration and area under the curve for bupropion and the 3 metabolites.</paragraph> 
       </text> 
       <effectiveTime value="20100602"/> 
       <component> 
        <section ID="i4i_section_id_6d40273a-9091-4892-8274-c5d63bfd5e3d"> 
         <id root="49620c24-b19c-4e05-8d56-cf59a423a74a"/> 
         <code codeSystem="2.16.840.1.113883.6.1" code="42229-5" displayName="SPL UNCLASSIFIED SECTION"/> 
         <text> 
          <paragraph> 
          <content styleCode="bold"> 
           <content styleCode="italics">Absorption: </content> 
          </content>Following oral administration of WELLBUTRIN XL to healthy volunteers, time to peak plasma concentrations for bupropion was approximately 5 hours and food did not affect the C<sub>max</sub> or AUC of bupropion. </paragraph> 
         </text> 
         <effectiveTime value="20100602"/> 
        </section> 
       </component> 
       <component> 

Пожалуйста, помогите мне из этого заранее спасибо ....

+0

http://www.raywenderlich.com/14172/how-to-parse-html-on-ios –

+0

я знаю, как разобрать, но в связи с HTML тега его дают пробелы в значении тега а также создать тег для каждого тега html. –

+0

Что вы хотите разобрать? –

ответ

Смежные вопросы