Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

XML Format help
I want to determinate if a xml is well-format and valid before export
it to
database.

how can i find if the xml feed is well formated one??

Report this thread to moderator Post Follow-up to this message
Old Post
Damodhar
04-03-08 03:17 AM


Re: XML Format help
Damodhar wrote:
> I want to determinate if a xml is well-format and valid before export
> it to
> database.
>
> how can i find if the xml feed is well formated one??
If you have the XML in a file, use an XML parser or editor with such a
parser. For instance, "XML Copy Editor" (see
http://xml-copy-editor.sourceforge.net/).

Best regards.

Report this thread to moderator Post Follow-up to this message
Old Post
Dikkie Dik
04-03-08 01:12 PM


Re: XML Format help
On Wed, 2 Apr 2008 17:59:32 -0700 (PDT), in comp.lang.php Damodhar
<damu.be@gmail.com>
<f7fcd25d-b8d4-4584-9758-80b02a85c8f7@s8g2000prg.googlegroups.com>
wrote:

>| I want to determinate if a xml is well-format and valid before export
>| it to
>| database.
>|
>| how can i find if the xml feed is well formated one??

Open the xml file with your web browser (IE or Firefox).
-- -------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au  : Remove your pants to reply
-- -------------------------------------------------------------

Report this thread to moderator Post Follow-up to this message
Old Post
Jeff North
04-03-08 01:12 PM


Re: XML Format help
If it's an automatic task then just try this:

libxml_internal_errors(true);
$parsed_xml=simplexml_load_string($xml) //or
simplexml_load_file($path) if the xml is in a file
if ($parsed_xml)
//xml is valid, do your thing
else
//xml not valid

Report this thread to moderator Post Follow-up to this message
Old Post
George Maicovschi
04-03-08 01:12 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:15 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.