Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

c# - ENML Abstraction?

c# enml note create content

  • Please log in to reply
4 replies to this topic

#1 galbarm

galbarm

  • Pip
  • Title: Member
  • Group: Members
  • 8 posts

Posted 28 January 2012 - 07:57 PM

Hello,
I'm trying to create a note and add some simple text to its "body" (content).
I'd like to know if the c# library presents any way of doing this without actually creating an ENML string.

I found that the opposite operation - getting the note content as a text actually exists in some way but I couldn't find a way of creating one.

#2 jefito

jefito

  • Title: Evernote Evangelist
  • Group: Evernote Evangelist
  • 8,225 posts

Posted 29 January 2012 - 03:12 AM

As best I can tell, there is no opposite function. Retrieving a note's search text (the function you're referring to) is a destructive operation; it removes the note's XHTML wrapper, plus possibly any OCR'ed content, returning the note content that may be searched. But createNote seems to require you to supply the XHTML wrapper for the note content. I'd suggest that you create a simple note, figure out what the minimal XHTML wrapper is, and then write a utility function that takes simple text, wraps it with the minimal XHTML wrapper, and submit that to createNote.
~Jeff
EVERNOTE: Getting Started | Support Page | Knowledge Base | Support Requests
If someone helped you, or you like or agree with someone's post, let them (and us) know by clicking their post's "Like" button.

#3 Martin Packer

Martin Packer

  • PipPipPipPipPip
  • Title: Browncoat
  • Group: Members
  • 389 posts

Posted 29 January 2012 - 04:35 AM

To echo what @jefito's saying it's pretty simple to figure out what the wrapper should be. More fun is working out what's allowed inside. And even that's well documented. I've done this in languages other than C# though I'm afraid what I have isn't going to be in any fit state to share.

Martin

#4 galbarm

galbarm

  • Pip
  • Title: Member
  • Group: Members
  • 8 posts

Posted 29 January 2012 - 08:35 PM

Thanks.
I've just done ae jefito suggested.
Actually I've used the ENML editor that was posted here in the forum to see how the most simple note looks like and I've copied it.

#5 jefito

jefito

  • Title: Evernote Evangelist
  • Group: Evernote Evangelist
  • 8,225 posts

Posted 29 January 2012 - 09:48 PM

Well done. I didn't think to reference the ENML Editor; I usually do so when it seems appropriate.
~Jeff
EVERNOTE: Getting Started | Support Page | Knowledge Base | Support Requests
If someone helped you, or you like or agree with someone's post, let them (and us) know by clicking their post's "Like" button.





Also tagged with one or more of these keywords: c#, enml, note, create, content

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote