Frage

I have an XML file , which is not well-formed. ( it is basically a DHTML file used as a part of content tool , most of the html tags are not ended ).

Now this XML file is something that our team does not have any control over. It comes from different teams.

The problem comes when we are trying to do XSLT transformation on these XML files.

Before doing an XSLT transformation it tries of validate the XML file and throws an error saying that the XML document is not valid.

Is there a way in XSLT where I can say that do not validate the XML file which you need to transform. We are using XMLSpy for testing.

War es hilfreich?

Lösung

I have an XML file , which is not well-formed.

There's no such thing. If it's not well-formed then it's not XML.

If you have to deal with this data, then just drop "XML" from your thinking. It's not XML, forget all the XML tools and all the benefits you get from using a standardized format. You're dealing with a proprietary data format, and you're on your own without any tools.

Of course, it might be close enough to XML that your best strategy is to convert it to XML before doing any further processing.

Andere Tipps

You cannot make XSLT transform against not well-formed XML. You should convert you DHTML code to XML before. For do this you can use some html to xml converter like this

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top