Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8001967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:14:13+00:00 2026-06-04T16:14:13+00:00

I don’t know how much I can say about the app that I am

  • 0

I don’t know how much I can say about the app that I am creating due to some NDA functionality, even if it may not be new I still would like to save myself, but I was wondering if there was a way to pass a xmlDocPtr through a selector? If so how is this possible? I know that I can take a char* and convert it to a NSString, but does a xmlDocPtr have the same capability to convert to an id type?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:14:14+00:00Added an answer on June 4, 2026 at 4:14 pm

    What do you mean “pass an xmlDocPtr through a selector”? Given that you seem to be trying to convert it to an obj-c object, I’m assuming you’re trying to use -performSelector:withObject:? Because if you’re just calling the method, there’s no restriction on types of arguments.

    If you need to dynamically call a selector that takes a non-obj-c object, you have two alternatives. The first, and recommended, approach is to create an NSInvocation.

    SEL sel = // selector that takes xmlDocPtr
    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[target methodSignatureForSelector:sel]];
    [invocation setSelector:sel];
    [invocation setArgument:&xmlDocPtr atIndex:2]; // 0 is self, 1 is _cmd
    [invocation invokeWithTarget:target];
    // if you need a return value, use
    // typeOfReturnValue retVal;
    // [invocation getReturnValue:&retVal];
    

    The second is to cast objc_msgSend() to the appropriate function type and call that, although this gets more complicated (and somewhat architecture-dependent) if there’s floating point values or struct values involved (as method arguments or return value). You should only take this approach if you’re comfortable playing with the obj-c runtime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know much about encryption... Say I'm preparing a SAML request to submit to
Don't know if anyone can help me with this or if it's even possible.
Don't have much to say, just can get into the event handler. XAML: <Grid>
Don't know much about running a function on every item in an array, still
I don't want to know a way to preload images, I found much on
Don't know a whole lot about streams. Why does the first version work using
I don't have much PHP experience and I want to know how to best
Don't know why I can't reply to people on here with only a small
Don't think there's much to say, here's my code for (int i = 0;
I don't know Perl. I don't even love it, but i'm obliged to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.