Thread: libxml prints errors on the screen

  1. #1
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78

    libxml prints errors on the screen

    If some error occurs during parsing the XML document (stored in file or RAM), the library function that caused error (xmlParseFile() or xmlParseDoc()) prints the errors on the stdout. Is there a way to force libxml not to print anything?

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    You can redirect stdout. It seems more likely that the error is printed to stderr though.
    If you understand what you're doing, you're not learning anything.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You mean like read the manual?

    Like say initialising it with your own error handler?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78
    Found: xmlReadDoc() should be used instead of xmlParseDoc() and the option for suppressing can be specified as last argument.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How does this user get screen to run under root?
    By Overworked_PhD in forum Tech Board
    Replies: 2
    Last Post: 06-28-2009, 09:31 AM
  2. Linux Problem Screen Resoultion
    By Matus in forum Tech Board
    Replies: 1
    Last Post: 01-29-2009, 04:39 PM
  3. [C] GDI: how to erase material drawn at an entire screen DC
    By pc2-brazil in forum Windows Programming
    Replies: 3
    Last Post: 01-24-2009, 07:24 PM
  4. console screen (Windows)
    By hakan in forum C++ Programming
    Replies: 1
    Last Post: 03-12-2008, 06:35 AM
  5. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM