Skip to content


Subversion checkout URL

You can clone with
Download ZIP


document description returns <(null)/> #14

bejmax opened this Issue · 2 comments

2 participants


I apologize in advance, don't have much experience with parsing XML. If I parse with NSXMLParser it will parse the XML (validated with NSLog for each "didStartElement" and "foundCharacters" call) which I retrieve from a web service (from their site: "... output of the request is XML, which is presented in the Atom feed format").

If I print out the XML as an NSString converted from NSData received from the site with the following line:

    NSString * responseString = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];

It prints the XML below which i also validated on a website. However, when I try to create an SMXMLDocument with the following line of code, the document when printed in NSLog prints "<(null)/>".

    SMXMLDocument * document = [SMXMLDocument documentWithData:responseObject error:&error];
    NSLog(@"Document:\n %@", document);

Is this (Atom) formatted XML not supported or am I doing something incorrectly?

<?xml version="1.0" encoding="UTF-8"?>
<feed xml:base="" xml:lang="en" xmlns="
/2005/Atom" xmlns:v3="urn:hl7-org:v3" xmlns:xsi="">
    <title type="text">MedlinePlus Connect</title>
    <subtitle type="text">MedlinePlus Connect results for RXCUI 387013</subtitle>
        <name>U.S. National Library of Medicine</name>
    <updated type="text">2013-02-03T05:02:19Z</updated>
    <category scheme="REDS_MT010001UV" term="MATCHED">
        <v3:mainSearchCriteria classCode="OBS" moodCode="DEF" xmlns:v3="urn:hl7-org:v3">
        <v3:code code="KSUBJ" codeSystem="2.16.840.1.113883.5.4" xmlns:v3="urn:hl7-org:v3"/>
        <v3:value code="387013" codeSystem="2.16.840.1.113883.6.88" displayName="" xmlns:v3="urn:hl7-org:v3"/>
        <v3:informationRecipient typeCode="IRCP" xmlns:v3="urn:hl7-org:v3">
            <v3:patient classCode="PAT" xmlns:v3="urn:hl7-org:v3"/>
       <link href="" rel="alternate"/>
       <id>tag:, 2013-03-02:/medlineplus/druginfo/meds/a608029.html</id>

Wow, i apologize. I first downloaded the non-arc version but my test build uses ARC so i downloaded that and replaced the original files i put in my test program. Once i put an NSLog statement in a function in your class, it recompiled, re-linked and it works. So, it must have failed due to caching the wrong version of your files.

Sorry to waste your time!

@bejmax bejmax closed this

Oh wild, interesting! Well glad it all worked out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.