Re: Element name replacement

An XML Schema can tell you that your document is invalid, but there is 
nothing in XSD that helps you repair it when it isn't.

For HTML there are tools such as HTMLTidy that attempt to do this: see 
http://tidy.sourceforge.net

Michael Kay
Saxonica

On 12/10/2012 10:10, salma.siddiqa wrote:
> Hi,
> I am new to XSD, I went through your blog would you kindly help me.
> I want to generate an xsd which will validate an xml.
> The xml file is the html converted file and hence has html tags
> I want to validate the tag Hierarchy
> Eg: if the <p> tag has <div> tags within it then replace the <p> tag's element name as "div"
> <div id="div1">
>   <p id="p1">
>        *<**div**  id="div2">hello</**div**>*
> </p>
> </div>
>   
>   
> This should be :
> <div id="div1">
>   <p id="p1">
>        *<**p**  id="div2">hello</**p**>*
> </p>
> </div>
>   
>   
>   
>   
> I need it urgently, looking forward for your reply.
>   
> Thanks & Regards
> Salma Siddiqa
>

Received on Friday, 12 October 2012 14:09:39 UTC