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 9181907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:26:01+00:00 2026-06-17T18:26:01+00:00

Ever seen Htmlize ? Invoked in an existing buffer, it produces a new buffer

  • 0

Ever seen Htmlize? Invoked in an existing buffer, it produces a new buffer with the HTML-ized version of the original buffer contents.

I’d like something similar, but I want it for XML-to-JSON. (and Vice versa for bonus points).

Given an XML buffer, I’d like to produce an “equivalent” JSON buffer, constructed based on a few settings or assuumptions.

For example, starting with this:

<sample>
 <text>This is the text</text>
</sample>

I’d like to get this:

{ "sample" : { "text" : "this is the text" } } 

Handling of namespaces, attributes, and arrays… ideally it would all be configurable in some way. That would be in the settings somewhere. One option would be to simply strip xml namespaces. Another would be to append the xml namespace for an element in a named json property.

Does anything like this exist? Maybe it even exists as part of the built-in xml or js modes in emacs v24?

I’d rather grab someone else’s work! and not spend my evening tonight writing this. ….

  • 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-17T18:26:02+00:00Added an answer on June 17, 2026 at 6:26 pm

    Not that I’m aware of. But this may get you started:

    (require 'json)
    (json-encode-list (xml-parse-region))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone ever seen an exception like this (with version 1.6.0_11 of the JVM)?:
I feel like I've only ever seen this here on SO, but I can't
Ever since I installed emacs on a new machine I have seen an ugly
Anyone ever seen anything like this before? It's driving me mad! Basically, I've got
Has anyone ever seen a crash log like this before where the UIKit and
Has anyone ever seen this? I don't how to expand on this. It's the
This is the only place I've ever seen and , or and not listed
This might be the most stupid thing i've ever seen, i had a broken
I have seen many souce codes but I have never ever come across a
Has anyone ever seen an exception thrown when calling close method on any closable

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.