all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* XML parsing advice
@ 2013-01-27  7:35 Eric Abrahamsen
  2013-01-28 14:48 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2013-01-27  7:35 UTC (permalink / raw)
  To: help-gnu-emacs

I've been asking around on #emacs about this but thought I'd try here as
well: I've recently wanted to parse and edit XML files (both for EPUBs
and the TMX translation memory format). The wiki[1] seems to indicate
that things are largely broken: xpath.el and xpath-parser.el rely on
very out of date libraries. Dom.el works, but apparently can't put its
dom document back into XML.

I need to go the whole round trip: parsing a file, editing nodes and
attributes, and then saving the tree back to an XML file. I can start
doing this myself, but wanted to check if anyone had any better interim
solutions.

Thanks!
Eric




[1] http://www.emacswiki.org/emacs/XmlParser




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XML parsing advice
  2013-01-27  7:35 XML parsing advice Eric Abrahamsen
@ 2013-01-28 14:48 ` Stefan Monnier
  2013-01-29  2:40   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2013-01-28 14:48 UTC (permalink / raw)
  To: help-gnu-emacs

> I need to go the whole round trip: parsing a file, editing nodes and
> attributes, and then saving the tree back to an XML file.

Recent Emacsen can be compiled with libxml2.  Currently this only
provides access to the parser (see libxml-parse-xml-region and
libxml-parse-html-region), but we could extend it to provide access to
other parts of the libxml2 API.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: XML parsing advice
  2013-01-28 14:48 ` Stefan Monnier
@ 2013-01-29  2:40   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2013-01-29  2:40 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I need to go the whole round trip: parsing a file, editing nodes and
>> attributes, and then saving the tree back to an XML file.
>
> Recent Emacsen can be compiled with libxml2.  Currently this only
> provides access to the parser (see libxml-parse-xml-region and
> libxml-parse-html-region), but we could extend it to provide access to
> other parts of the libxml2 API.

Sounds good to me! Seems like it would make more sense to use the C
libraries than re-implement xpath in elisp...

Should I open a "bug report" and make a feature request?




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-29  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-27  7:35 XML parsing advice Eric Abrahamsen
2013-01-28 14:48 ` Stefan Monnier
2013-01-29  2:40   ` Eric Abrahamsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.