Probleme XML
AssomniA
-
AssomniA -
AssomniA -
Bonjour, Bonjour a tous, petit probleme XML si vous pouviez m'aider :
Voila mon code d'erreur :
Code: Tout sélectionner
SystemID: E:\autounattend.xml
Endroit: 4:2
Description: The markup in the document following the root element must be well-formed.
Et voila mon code en XML :
Code: Tout sélectionner
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk>
<CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>10000</Size> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Active>true</Active> <Extend>true</Extend> <Format>NTFS</Format> <Label>OS_Install</Label> <Letter>C</Letter> <Order>1</Order> <PartitionID>1</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> <WillShowUI>OnError</WillShowUI> </DiskConfiguration> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>fr-FR</UILanguage> </SetupUILanguage> <InputLocale>040C</InputLocale> <SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage> <UserLocale>fr-FR</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Reseal> <Mode>Audit</Mode> </Reseal> </component> </settings> <cpi:offlineImage cpi:source="catalog:c:/opktools/install_windows vista ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
<settings pass="auditUser">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OEMInformation> <Manufacturer>FABRIKAM</Manufacturer>
<Model>FABRIKAM Gamer 510</Model>
<SupportHours>9h-19h</SupportHours>
<SupportPhone>12 34 56 78 90</SupportPhone>
<SupportURL>www.fabrikam.fr</SupportURL>
<Logo>C:\Windows\OEM\FABRIKAM.BMP</Logo>
</OEMInformation>
</component>
</settings>
Si vous avez trouvé je voudrais bien votre aide. Merci plein
Voila mon code d'erreur :
Code: Tout sélectionner
SystemID: E:\autounattend.xml
Endroit: 4:2
Description: The markup in the document following the root element must be well-formed.
Et voila mon code en XML :
Code: Tout sélectionner
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk>
<CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>10000</Size> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Active>true</Active> <Extend>true</Extend> <Format>NTFS</Format> <Label>OS_Install</Label> <Letter>C</Letter> <Order>1</Order> <PartitionID>1</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> <WillShowUI>OnError</WillShowUI> </DiskConfiguration> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>fr-FR</UILanguage> </SetupUILanguage> <InputLocale>040C</InputLocale> <SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage> <UserLocale>fr-FR</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Reseal> <Mode>Audit</Mode> </Reseal> </component> </settings> <cpi:offlineImage cpi:source="catalog:c:/opktools/install_windows vista ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
<settings pass="auditUser">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OEMInformation> <Manufacturer>FABRIKAM</Manufacturer>
<Model>FABRIKAM Gamer 510</Model>
<SupportHours>9h-19h</SupportHours>
<SupportPhone>12 34 56 78 90</SupportPhone>
<SupportURL>www.fabrikam.fr</SupportURL>
<Logo>C:\Windows\OEM\FABRIKAM.BMP</Logo>
</OEMInformation>
</component>
</settings>
Si vous avez trouvé je voudrais bien votre aide. Merci plein
A voir également:
- Probleme XML
- Xml viewer - Télécharger - Édition & Programmation
- Office xml handler - Télécharger - Traitement de texte
- Driveimage xml - Télécharger - Sauvegarde
- Txt en xml - Forum Programmation
- Impossible d'ouvrir le fichier office open xml - Forum Bureautique
10 réponses
Bonjour, tu peux reposter le contenu du fichier entre des balises "code" s'il te plaît? (au dessus de l'endroit pour rentrer le texte, tu as un icône avec un rectangle blanc et un < > en bleu dessus)
Merci :)
Merci :)
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>10000</Size> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Active>true</Active> <Extend>true</Extend> <Format>NTFS</Format> <Label>OS_Install</Label> <Letter>C</Letter> <Order>1</Order> <PartitionID>1</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> <WillShowUI>OnError</WillShowUI> </DiskConfiguration> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>fr-FR</UILanguage> </SetupUILanguage> <InputLocale>040C</InputLocale> <SystemLocale>fr-FR</SystemLocale> <UILanguage>fr-FR</UILanguage> <UserLocale>fr-FR</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Reseal> <Mode>Audit</Mode> </Reseal> </component> </settings> <cpi:offlineImage cpi:source="catalog:c:/opktools/install_windows vista ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend> <settings pass="auditUser"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OEMInformation> <Manufacturer>FABRIKAM</Manufacturer> <Model>FABRIKAM Gamer 510</Model> <SupportHours>9h-19h</SupportHours> <SupportPhone>12 34 56 78 90</SupportPhone> <SupportURL>www.fabrikam.fr</SupportURL> <Logo>C:\Windows\OEM\FABRIKAM.BMP</Logo> </OEMInformation> </component> </settings>
sa a coupé un morceau :s moi le logiciel me dit que l'erreur se trouve ici :
<settings pass="auditUser">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OEMInformation> <Manufacturer>FABRIKAM</Manufacturer>
<Model>FABRIKAM Gamer 510</Model>
<SupportHours>9h-19h</SupportHours>
<SupportPhone>12 34 56 78 90</SupportPhone>
<SupportURL>www.fabrikam.fr</SupportURL>
<Logo>C:\Windows\OEM\FABRIKAM.BMP</Logo>
</OEMInformation>
</component>
</settings>
Bon, déjà quand tu as un problème de ce genre, il vaut mieux mettre ton fichier sous la forme suivante:
Ca m'a permis de voir directement que tu as au moins deux tags "component" , hors tu n'as le droit qu'à un tag qui lui peut avoir plusieurs enfants, il te faut donc introduire un "components" qui contient tous les "component"
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>10000</Size> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Active>true</Active> <Extend>true</Extend> <Format>NTFS</Format> <Label>OS_Install</Label> <Letter>C</Letter> <Order>1</Order> <PartitionID>1</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> <WillShowUI>OnError</WillShowUI> </DiskConfiguration> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> </component> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>fr-FR</UILanguage> </SetupUILanguage> <InputLocale>040C</InputLocale> <SystemLocale>fr-FR</SystemLocale> <UILanguage>fr-FR</UILanguage> <UserLocale>fr-FR</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Reseal> <Mode>Audit</Mode> </Reseal> </component> </settings> <cpi:offlineImage cpi:source="catalog:c:/opktools/install_windows vista ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend> <settings pass="auditUser"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OEMInformation> <Manufacturer>FABRIKAM</Manufacturer> <Model>FABRIKAM Gamer 510</Model> <SupportHours>9h-19h</SupportHours> <SupportPhone>12 34 56 78 90</SupportPhone> <SupportURL>www.fabrikam.fr</SupportURL> <Logo>C:\Windows\OEM\FABRIKAM.BMP</Logo> </OEMInformation> </component> </settings>
Ca m'a permis de voir directement que tu as au moins deux tags "component" , hors tu n'as le droit qu'à un tag qui lui peut avoir plusieurs enfants, il te faut donc introduire un "components" qui contient tous les "component"
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Mince alors, je ne m'y connais pas plus que sa :s, comment faire pour reparer sa alors ? tu peux m'aider ?
En fait je pense que dans ton cas, tu as mis plusieurs fichiers xml dans un seul, il vaut mieux les garder de manière séparée. Si tu ne veux pas, regarde ce que j'ai mis :)
il te faut donc introduire un "components" qui contient tous les "component"
genre :
J'ai pas regardé ton fichier en détail mais c'est le principe...
il te faut donc introduire un "components" qui contient tous les "component"
genre :
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE">
<components>
<component...
</component>
<component ....
<component>
</components>
J'ai pas regardé ton fichier en détail mais c'est le principe...
Ok j'ai compris, je l'ai mis sous cette forme tu peux me dire si sa convient ? dsl de te prendre du temps :s
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<Disk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Size>10000</Size>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Extend>true</Extend>
<Format>NTFS</Format>
<Label>OS_Install</Label>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<UserData>
<AcceptEula>true</AcceptEula>
</UserData>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
</component>
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage> <UILanguage>fr-FR</UILanguage> </SetupUILanguage> <InputLocale>040C</InputLocale> <SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage> <UserLocale>fr-FR</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Reseal> <Mode>Audit</Mode> </Reseal> </component>
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OEMInformation> <Manufacturer>FABRIKAM</Manufacturer>
<Model>FABRIKAM Gamer 510</Model>
<SupportHours>9h-19h</SupportHours>
<SupportPhone>12 34 56 78 90</SupportPhone>
<SupportURL>www.fabrikam.fr</SupportURL>
<Logo>C:\Windows\OEM\FABRIKAM.BMP</Logo>
</OEMInformation>
</component>
</settings> <cpi:offlineImage cpi:source="catalog:c:/opktools/install_windows vista ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
Dans tous les cas Oxygen ne me met pas d'erreur de mise en forme c'est un bon début :). J'espere ne pas avoir fait de betise(s).
Quelqu'un peux me corriger dans le cas inverse ?
Quelqu'un peux me corriger dans le cas inverse ?