Before I start, let me recommend you to use another language that is capable of treating XML data as XML data natively; treating them as "normal" text data may damage the XML data structure.
Anyway, to insert a line of text into a file after the first line, you could use the following code:
setlocal EnableDelayedExpansion
set "SECOND=<?xml-stylesheet href="view.xsl" type="text/xsl"?>"
< "datafile.xml" > "datafile.xml.tmp" (
set /P FIRST=""
echo(!FIRST!
echo(!SECOND!
findstr "^"
)
> nul move /Y "datafile.xml.tmp" "datafile.xml"
endlocal
Limitations: the text data must be ANSI-encoded; the first line must not be longer than 1023 bytes (including the trailing line-break); the remaining lines must not be longer than 8192 bytes (also including the trailing line-break); the script does not check the content of the file, it simply inserts a line after the first one.
Next time when asking a question, please show some own efforts to solve the problem...