Handling invalid XML recommendation method

I am trying to use Delphi XE2 to integrate the program with a third-party service. The problem I encountered is that the service did not forward any values ​​in the XML document they sent me.

This is one of their “example” xml documents



1
A New Plan
January 16 & 17, 2010< br /> A New Plan For Your Family

...

My initial plan was to wrap all the data in CDATA tags, but this does not seem to be an ideal solution.

I also considered looking for the & character and replacing it with & amp; but it did not escape any users Input, including and searching and replacing each invalid xml character sounds like a bad idea.

Any suggestions on how to deal with invalid xml documents?

First refuse to call these documents “XML”-they are not XML.

Convince your supplier that many people have adopted XML and benefited from it. If they do the same, it would be a good idea.

If your supplier thinks they give you Send the XML, please make it correct. Almost XML does not help. It is like sending Java code that cannot be compiled.

I am trying to use Delphi XE2 to compare the program with the Three-way service integration. The problem I encountered was that the service did not forward any values ​​in the XML documents they sent to me.

This is one of their “sample” xml documents



1
A New Plan
January 16 & 17, 2010
A New Plan For Your Family< br />

...

My initial plan was to wrap all data in CDATA tags, but this does not seem to be an ideal The solution.

I also considered looking for & characters and replacing it with & amp; but it did not escape any user input, including and searching and replacing every invalid xml character sounds like the same A bad idea.

Any suggestions on how to deal with invalid xml documents?

First refuse to call these documents “XML”-they are not XML.

Convince your supplier, many People have adopted XML and benefited from it, and it would be a good idea if they did the same.

If your supplier thinks they send you XML, please correct it. It is almost XML and No help. It’s like sending Java code that cannot be compiled.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 6046 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.