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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:30:48+00:00 2026-06-10T04:30:48+00:00

I’m writing a small application that aims to scrape XML from multiple sites and

  • 0

I’m writing a small application that aims to scrape XML from multiple sites and then process the data in a way I want it to. I made such an application before but in different languages and I am writing this one for Haskell practice.

Anyway, to the point. After looking around the Web at million and one different XML parsers, I decided to go with HXT because who doesn’t love arrows. Following the page http://www.haskell.org/haskellwiki/HXT/Conversion_of_Haskell_data_from/to_XML I have arrived at something that seems to read my XML file and put it into Haskell data types I defined. I’m using instances of XmlPickler to read the data from the file to achieve this. I arrived at something that would work, except for this error:

fatal error: document unpickling failed
xpCheckEmptyAttributes: unprocessed XML attribute(s) detected

I’m aware that I didn’t process all attributes. I don’t want all the attributes. Is there a way to ignore these? I imagine that I could process all the attributes, put them in a new data type and then extract attributes from that to get the data that I actually want. I’d like to avoid this little hack though and hence I’m here, asking for The Proper Way™.

Am I using the wrong tool for the job? Is unpickling 3rd party data unsafe (like it is in Python)?

I looked around the Web for a solution but Text.XML.HXT.Arrow.XmlState.SystemConfig doesn’t seem to have what I need to disable this behaviour.

  • 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-10T04:30:49+00:00Added an answer on June 10, 2026 at 4:30 am

    I came across this exact problem the other day, and came to the following conclusion:

    Am I using the wrong tool for the job?

    Yes. HXT’s pickle functionality is designed for serializing and unserializing data easily, but without much flexibility. From the linked page:

    They are intended to read machine generated XML, ideally generated by the same pickler.

    As for:

    Is unpickling 3rd party data unsafe (like it is in Python)?

    Not with HXT, no. Pickling in python is unsafe because it (loosely) equates to calling eval() on arbitrary content. HXT is just an XML parser, there’s no calling of arbitrary code going on.

    Personally, I’ve moved on to manually processing XML using the xml package (Text.XML.Light) instead of trying to get HXT’s picklers to do what I want. It’s not as concise, but it lets me ignore data that I don’t care about. You could presumably use the non-pickle parts of HXT just as well though, if you like arrows (I’m still wrapping my head around them ;)).

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters

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.