Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Writing an XML file using XPath?
System
What is the best way to write an XML file using XML::XPath.pm? It seems as though it's unsupported and I'm not getting any love by examining at its submodules, either.
Thanks,
Dave
Find more posts tagged with
Comments
Johnny
I thought that module was just for xpath queries (IE just reading). I haven't come across anything that allows you to write back using xpath - but I could be wrong.
I guess you could use xslt with xpath to write. Do you need to use xpath?... Have you looked at XML:
imple? You can use perl hashes to write XML - nice and easy with a few greps/maps.
Migrateduser
From what I understand about XPath, I think you're right. We're trying to standardize on XPath and I was / am interested to know if there's a supported way to write XML but it appears that it may not be possible. I have an interim solution, though, where I'm making whatever changes I need via XPath, munging the root-level node as a string and then writing it out. It's working well but is not as clean as I would prefer.
Dave
Migrateduser
Try XML::Twig or XML:
imple