Lines Matching refs:xml

5  * Two classes, MainConfigFile and MachineConfigFile, represent the VirtualBox.xml and
70 #include <iprt/cpp/xml.h>
154 xml::Document *pDoc;
155 xml::ElementNode *pelmRoot;
185 * throwing xml::LogicError instances easier. That class is public
188 class settings::ConfigFileError : public xml::LogicError
192 const xml::Node *pNode,
194 : xml::LogicError()
264 xml::XmlFileParser parser;
265 m->pDoc = new xml::Document;
510 void ConfigFileBase::readExtraData(const xml::ElementNode &elmExtraData,
513 xml::NodesLoop nlLevel4(elmExtraData);
514 const xml::ElementNode *pelmExtraDataItem;
538 void ConfigFileBase::readUSBDeviceFilters(const xml::ElementNode &elmDeviceFilters,
541 xml::NodesLoop nl1(elmDeviceFilters, "DeviceFilter");
542 const xml::ElementNode *pelmLevel4Child;
583 * Reads a media registry entry from the main VirtualBox.xml file.
595 const xml::ElementNode &elmMedium,
619 const xml::ElementNode *pelmImage;
752 xml::NodesLoop nl2(elmMedium, "Property");
753 const xml::ElementNode *pelmHDChild;
766 * Reads a media registry entry from the main VirtualBox.xml file and recurses
776 const xml::ElementNode &elmMedium, // HardDisk node if root; if recursing,
793 xml::NodesLoop nl2(elmMedium, m->sv >= SettingsVersion_v1_4 ? "HardDisk" : "DiffHardDisk");
794 const xml::ElementNode *pelmHDChild;
819 void ConfigFileBase::readMediaRegistry(const xml::ElementNode &elmMediaRegistry,
822 xml::NodesLoop nl1(elmMediaRegistry);
823 const xml::ElementNode *pelmChild1;
836 xml::NodesLoop nl2(*pelmChild1);
837 const xml::ElementNode *pelmMedium;
865 * Note: this function doesn't in fill given list from xml::ElementNodesList, because there is conflicting
868 void ConfigFileBase::readNATForwardRuleList(const xml::ElementNode &elmParent, NATRuleList &llRules)
870 xml::ElementNodesList plstRules;
872 for (xml::ElementNodesList::iterator pf = plstRules.begin(); pf != plstRules.end(); ++pf)
888 void ConfigFileBase::readNATLoopbacks(const xml::ElementNode &elmParent, NATLoopbackOffsetList &llLoopbacks)
890 xml::ElementNodesList plstLoopbacks;
892 for (xml::ElementNodesList::iterator lo = plstLoopbacks.begin();
910 void ConfigFileBase::setVersionAttribute(xml::ElementNode &elm)
981 * Creates a new stub xml::Document in the m->pDoc member with the
998 m->pDoc = new xml::Document;
1020 // compose new filename: strip off trailing ".xml"/".vbox"
1022 Utf8Str strExt = ".xml";
1023 if (m->strFilename.endsWith(".xml"))
1031 // and append something like "-1.3-linux.xml"
1034 strFilenameNew.append(strExt); // .xml for main config, .vbox for machine config
1056 void ConfigFileBase::buildExtraData(xml::ElementNode &elmParent,
1061 xml::ElementNode *pelmExtraData = elmParent.createChild("ExtraData");
1068 xml::ElementNode *pelmThis = pelmExtraData->createChild("ExtraDataItem");
1089 void ConfigFileBase::buildUSBDeviceFilters(xml::ElementNode &elmParent,
1098 xml::ElementNode *pelmFilter = elmParent.createChild("DeviceFilter");
1145 xml::ElementNode &elmMedium,
1151 xml::ElementNode *pelmMedium;
1174 xml::ElementNode *pelmProp = pelmMedium->createChild("Property");
1224 void ConfigFileBase::buildMediaRegistry(xml::ElementNode &elmParent,
1227 xml::ElementNode *pelmMediaRegistry = elmParent.createChild("MediaRegistry");
1229 xml::ElementNode *pelmHardDisks = pelmMediaRegistry->createChild("HardDisks");
1237 xml::ElementNode *pelmDVDImages = pelmMediaRegistry->createChild("DVDImages");
1245 xml::ElementNode *pelmFloppyImages = pelmMediaRegistry->createChild("FloppyImages");
1259 void ConfigFileBase::buildNATForwardRuleList(xml::ElementNode &elmParent, const NATRuleList &natRuleList)
1264 xml::ElementNode *pelmPF;
1281 void ConfigFileBase::buildNATLoopbacks(xml::ElementNode &elmParent, const NATLoopbackOffsetList &natLoopbackOffsetList)
1286 xml::ElementNode *pelmLo;
1326 // Structures shared between Machine XML and VirtualBox.xml
1361 * Reads one <MachineEntry> from the main VirtualBox.xml file.
1364 void MainConfigFile::readMachineRegistry(const xml::ElementNode &elmMachineRegistry)
1367 xml::NodesLoop nl1(elmMachineRegistry);
1368 const xml::ElementNode *pelmChild1;
1391 void MainConfigFile::readDHCPServers(const xml::ElementNode &elmDHCPServers)
1393 xml::NodesLoop nl1(elmDHCPServers);
1394 const xml::ElementNode *pelmServer;
1407 xml::NodesLoop nlOptions(*pelmServer, "Options");
1408 const xml::ElementNode *options;
1415 xml::NodesLoop nlConfig(*pelmServer, "Config");
1416 const xml::ElementNode *cfg;
1434 const xml::ElementNode& options)
1436 xml::NodesLoop nl2(options, "Option");
1437 const xml::ElementNode *opt;
1461 void MainConfigFile::readNATNetworks(const xml::ElementNode &elmNATNetworks)
1463 xml::NodesLoop nl1(elmNATNetworks);
1464 const xml::ElementNode *pelmNet;
1479 const xml::ElementNode *pelmMappings;
1483 const xml::ElementNode *pelmPortForwardRules4;
1488 const xml::ElementNode *pelmPortForwardRules6;
1508 * Throws variants of xml::Error for I/O, XML and logical content errors, which
1521 xml::NodesLoop nlRootChildren(*m->pelmRoot);
1522 const xml::ElementNode *pelmRootChild;
1527 xml::NodesLoop nlGlobalChildren(*pelmRootChild);
1528 const xml::ElementNode *pelmGlobalChild;
1558 xml::NodesLoop nlLevel4(*pelmGlobalChild);
1559 const xml::ElementNode *pelmLevel4Child;
1581 && ( (!pstrFilename) // empty VirtualBox.xml file
1614 * Called from the IVirtualBox interface to write out VirtualBox.xml. This
1624 xml::ElementNode *pelmGlobal = m->pelmRoot->createChild("Global");
1628 xml::ElementNode *pelmMachineRegistry = pelmGlobal->createChild("MachineRegistry");
1633 // <MachineEntry uuid="{5f102a55-a51b-48e3-b45a-b28d33469488}" src="/mnt/innotek-unix/vbox-machines/Windows 5.1 XP 1 (Office 2003)/Windows 5.1 XP 1 (Office 2003).xml"/>
1635 xml::ElementNode *pelmMachineEntry = pelmMachineRegistry->createChild("MachineEntry");
1642 xml::ElementNode *pelmNetserviceRegistry = pelmGlobal->createChild("NetserviceRegistry");
1643 xml::ElementNode *pelmDHCPServers = pelmNetserviceRegistry->createChild("DHCPServers");
1649 xml::ElementNode *pelmThis = pelmDHCPServers->createChild("DHCPServer");
1667 xml::ElementNode *pelmOptions = pelmThis->createChild("Options");
1675 xml::ElementNode *pelmOpt = pelmOptions->createChild("Option");
1695 xml::ElementNode *pelmCfg = pelmThis->createChild("Config");
1703 xml::ElementNode *pelmOpt = pelmCfg->createChild("Option");
1714 xml::ElementNode *pelmNATNetworks;
1724 xml::ElementNode *pelmThis = pelmNATNetworks->createChild("NATNetwork");
1734 xml::ElementNode *pelmPf4 = pelmThis->createChild("PortForwarding4");
1739 xml::ElementNode *pelmPf6 = pelmThis->createChild("PortForwarding6");
1745 xml::ElementNode *pelmMappings = pelmThis->createChild("Mappings");
1753 xml::ElementNode *pelmSysProps = pelmGlobal->createChild("SystemProperties");
1778 xml::XmlFileWriter writer(*m->pDoc);
2194 * Throws variants of xml::Error for I/O, XML and logical content errors, which
2212 xml::NodesLoop nlRootChildren(*m->pelmRoot);
2213 const xml::ElementNode *pelmRootChild;
2245 void MachineConfigFile::importMachineXML(const xml::ElementNode &elmMachine)
2289 void MachineConfigFile::readCpuTree(const xml::ElementNode &elmCpu,
2292 xml::NodesLoop nl1(elmCpu, "Cpu");
2293 const xml::ElementNode *pelmCpu;
2310 void MachineConfigFile::readCpuIdTree(const xml::ElementNode &elmCpuid,
2313 xml::NodesLoop nl1(elmCpuid, "CpuIdLeaf");
2314 const xml::ElementNode *pelmCpuIdLeaf;
2336 void MachineConfigFile::readNetworkAdapters(const xml::ElementNode &elmNetwork,
2339 xml::NodesLoop nl1(elmNetwork, "Adapter");
2340 const xml::ElementNode *pelmAdapter;
2390 xml::ElementNodesList llNetworkModes;
2392 xml::ElementNodesList::iterator it;
2400 const xml::ElementNode *pelmNode = *it;
2403 xml::ElementNodesList llDisabledNetworkModes;
2404 xml::ElementNodesList::iterator itDisabled;
2410 const xml::ElementNode *pelmDisabledNode = *itDisabled;
2423 void MachineConfigFile::readAttachedNetworkMode(const xml::ElementNode &elmMode, bool fEnabled, NetworkAdapter &nic)
2438 const xml::ElementNode *pelmDNS;
2445 const xml::ElementNode *pelmAlias;
2452 const xml::ElementNode *pelmTFTP;
2490 xml::NodesLoop nl(elmMode);
2491 const xml::ElementNode *pelmModeChild;
2531 void MachineConfigFile::readSerialPorts(const xml::ElementNode &elmUART,
2534 xml::NodesLoop nl1(elmUART, "Port");
2535 const xml::ElementNode *pelmPort;
2584 void MachineConfigFile::readParallelPorts(const xml::ElementNode &elmLPT,
2587 xml::NodesLoop nl1(elmLPT, "Port");
2588 const xml::ElementNode *pelmPort;
2622 void MachineConfigFile::readAudioAdapter(const xml::ElementNode &elmAudioAdapter,
2678 void MachineConfigFile::readGuestProperties(const xml::ElementNode &elmGuestProperties,
2681 xml::NodesLoop nl1(elmGuestProperties, "GuestProperty");
2682 const xml::ElementNode *pelmProp;
2703 void MachineConfigFile::readStorageControllerAttributes(const xml::ElementNode &elmStorageController,
2726 void MachineConfigFile::readHardware(const xml::ElementNode &elmHardware,
2748 xml::NodesLoop nl1(elmHardware);
2749 const xml::ElementNode *pelmHwChild;
2757 const xml::ElementNode *pelmCPUChild;
2765 const xml::ElementNode *pelmCPUChild;
2931 xml::NodesLoop nl2(*pelmHwChild, "Order");
2932 const xml::ElementNode *pelmOrder;
3042 const xml::ElementNode *pelmVideoChannel;
3063 const xml::ElementNode *pelmProperties = pelmHwChild->findChildElement("VRDEProperties");
3066 xml::NodesLoop nl(*pelmProperties);
3067 const xml::ElementNode *pelmProperty;
3085 const xml::ElementNode *pelmBIOSChild;
3176 const xml::ElementNode *pelmUSBChild;
3180 xml::NodesLoop nl2(*pelmUSBChild, "Controller");
3181 const xml::ElementNode *pelmCtrl;
3246 xml::NodesLoop nl2(*pelmHwChild, "SharedFolder");
3247 const xml::ElementNode *pelmFolder;
3301 const xml::ElementNode *pelmBwGroups;
3302 const xml::ElementNode *pelmIOChild;
3312 xml::NodesLoop nl2(*pelmBwGroups, "BandwidthGroup");
3313 const xml::ElementNode *pelmBandwidthGroup;
3344 const xml::ElementNode *pelmDevices;
3348 xml::NodesLoop nl2(*pelmDevices, "Device");
3349 const xml::ElementNode *pelmDevice;
3369 const xml::ElementNode *pelmCardReader;
3378 const xml::ElementNode *pelmDefault;
3400 void MachineConfigFile::readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments,
3417 xml::NodesLoop nl1(elmHardDiskAttachments, "HardDiskAttachment");
3418 const xml::ElementNode *pelmAttachment;
3466 void MachineConfigFile::readStorageControllers(const xml::ElementNode &elmStorageControllers,
3469 xml::NodesLoop nlStorageControllers(elmStorageControllers, "StorageController");
3470 const xml::ElementNode *pelmController;
3553 xml::NodesLoop nlAttached(*pelmController, "AttachedDevice");
3554 const xml::ElementNode *pelmAttached;
3586 const xml::ElementNode *pelmImage;
3595 const xml::ElementNode *pelmHostDrive;
3640 void MachineConfigFile::readDVDAndFloppies_pre1_9(const xml::ElementNode &elmHardware,
3643 xml::NodesLoop nl1(elmHardware);
3644 const xml::ElementNode *pelmHwChild;
3658 const xml::ElementNode *pDriveChild;
3704 const xml::ElementNode *pDriveChild;
3724 void MachineConfigFile::readTeleporter(const xml::ElementNode *pElmTeleporter,
3740 void MachineConfigFile::readDebugging(const xml::ElementNode *pElmDebugging, Debugging *pDbg)
3745 const xml::ElementNode * const pelmTracing = pElmDebugging->findChildElement("Tracing");
3757 void MachineConfigFile::readAutostart(const xml::ElementNode *pElmAutostart, Autostart *pAutostart)
3782 void MachineConfigFile::readGroups(const xml::ElementNode *pElmGroups, StringsList *pllGroups)
3791 xml::NodesLoop nlGroups(*pElmGroups);
3792 const xml::ElementNode *pelmGroup;
3821 const xml::ElementNode &elmSnapshot,
3847 const xml::ElementNode *pelmHardware;
3852 xml::NodesLoop nlSnapshotChildren(elmSnapshot);
3853 const xml::ElementNode *pelmSnapshotChild;
3866 xml::NodesLoop nlChildSnapshots(*pelmSnapshotChild);
3867 const xml::ElementNode *pelmChildSnapshot;
3956 void MachineConfigFile::readMachine(const xml::ElementNode &elmMachine)
3991 const xml::ElementNode *pelmHardware;
3996 xml::NodesLoop nlRootChildren(elmMachine);
3997 const xml::ElementNode *pelmMachineChild;
4070 void MachineConfigFile::buildHardwareXML(xml::ElementNode &elmParent,
4074 xml::ElementNode *pelmHardware = elmParent.createChild("Hardware");
4085 xml::ElementNode *pelmCPU = pelmHardware->createChild("CPU");
4087 xml::ElementNode *pelmHwVirtEx = pelmCPU->createChild("HardwareVirtEx");
4115 xml::ElementNode *pelmCpuTree = NULL;
4125 xml::ElementNode *pelmCpu = pelmCpuTree->createChild("Cpu");
4130 xml::ElementNode *pelmCpuIdTree = NULL;
4140 xml::ElementNode *pelmCpuIdLeaf = pelmCpuIdTree->createChild("CpuIdLeaf");
4148 xml::ElementNode *pelmMemory = pelmHardware->createChild("Memory");
4159 xml::ElementNode *pelmFirmware = pelmHardware->createChild("Firmware");
4176 xml::ElementNode *pelmHID = pelmHardware->createChild("HID");
4205 xml::ElementNode *pelmHPET = pelmHardware->createChild("HPET");
4212 xml::ElementNode *pelmChipset = pelmHardware->createChild("Chipset");
4240 xml::ElementNode *pelmParavirt = pelmHardware->createChild("Paravirt");
4244 xml::ElementNode *pelmBoot = pelmHardware->createChild("Boot");
4262 xml::ElementNode *pelmOrder = pelmBoot->createChild("Order");
4268 xml::ElementNode *pelmDisplay = pelmHardware->createChild("Display");
4286 xml::ElementNode *pelmVideoCapture = pelmHardware->createChild("VideoCapture");
4302 xml::ElementNode *pelmVRDE = pelmHardware->createChild("RemoteDisplay");
4340 xml::ElementNode *pelmVideoChannel = pelmVRDE->createChild("VideoChannel");
4369 xml::ElementNode *pelmProperties = pelmVRDE->createChild("VRDEProperties");
4376 xml::ElementNode *pelm = pelmProperties->createChild("Property");
4383 xml::ElementNode *pelmBIOS = pelmHardware->createChild("BIOS");
4387 xml::ElementNode *pelmLogo = pelmBIOS->createChild("Logo");
4412 xml::ElementNode *pelmDVD = pelmHardware->createChild("DVDDrive");
4413 xml::ElementNode *pelmFloppy = pelmHardware->createChild("FloppyDrive");
4476 xml::ElementNode *pelmUSB = pelmHardware->createChild("USBController");
4504 xml::ElementNode *pelmUSB = pelmHardware->createChild("USB");
4505 xml::ElementNode *pelmCtrls = pelmUSB->createChild("Controllers");
4513 xml::ElementNode *pelmCtrl = pelmCtrls->createChild("Controller");
4534 xml::ElementNode *pelmFilters = pelmUSB->createChild("DeviceFilters");
4538 xml::ElementNode *pelmNetwork = pelmHardware->createChild("Network");
4545 xml::ElementNode *pelmAdapter = pelmNetwork->createChild("Adapter");
4586 xml::ElementNode *pelmNAT;
4616 xml::ElementNode *pelmDisabledNode = NULL;
4634 xml::ElementNode *pelmPorts = pelmHardware->createChild("UART");
4640 xml::ElementNode *pelmPort = pelmPorts->createChild("Port");
4678 xml::ElementNode *pelmPort = pelmPorts->createChild("Port");
4687 xml::ElementNode *pelmAudio = pelmHardware->createChild("AudioAdapter");
4710 xml::ElementNode *pelmRTC = pelmHardware->createChild("RTC");
4731 xml::ElementNode *pelmSharedFolders = pelmHardware->createChild("SharedFolders");
4737 xml::ElementNode *pelmThis = pelmSharedFolders->createChild("SharedFolder");
4744 xml::ElementNode *pelmClip = pelmHardware->createChild("Clipboard");
4755 xml::ElementNode *pelmDragAndDrop = pelmHardware->createChild("DragAndDrop");
4768 xml::ElementNode *pelmIO = pelmHardware->createChild("IO");
4769 xml::ElementNode *pelmIOCache;
4777 xml::ElementNode *pelmBandwidthGroups = pelmIO->createChild("BandwidthGroups");
4784 xml::ElementNode *pelmThis = pelmBandwidthGroups->createChild("BandwidthGroup");
4802 xml::ElementNode *pelmPCI = pelmHardware->createChild("HostPci");
4803 xml::ElementNode *pelmPCIDevices = pelmPCI->createChild("Devices");
4811 xml::ElementNode *pelmThis = pelmPCIDevices->createChild("Device");
4821 xml::ElementNode *pelmEmulatedUSB = pelmHardware->createChild("EmulatedUSB");
4823 xml::ElementNode *pelmCardReader = pelmEmulatedUSB->createChild("CardReader");
4830 xml::ElementNode *pelmFrontend = pelmHardware->createChild("Frontend");
4831 xml::ElementNode *pelmDefault = pelmFrontend->createChild("Default");
4835 xml::ElementNode *pelmGuest = pelmHardware->createChild("Guest");
4838 xml::ElementNode *pelmGuestProps = pelmHardware->createChild("GuestProperties");
4844 xml::ElementNode *pelmProp = pelmGuestProps->createChild("GuestProperty");
4863 xml::ElementNode &elmParent,
4870 xml::ElementNode *pelmNAT;
4887 xml::ElementNode *pelmDNS;
4893 xml::ElementNode *pelmAlias;
4903 xml::ElementNode *pelmTFTP;
4933 xml::ElementNode *pelmMode = elmParent.createChild("GenericInterface");
4939 xml::ElementNode *pelmProp = pelmMode->createChild("Property");
4970 void MachineConfigFile::buildStorageControllersXML(xml::ElementNode &elmParent,
4973 std::list<xml::ElementNode*> *pllElementsWithUuidAttributes)
4975 xml::ElementNode *pelmStorageControllers = elmParent.createChild("StorageControllers");
4990 xml::ElementNode *pelmController = pelmStorageControllers->createChild("StorageController");
5054 xml::ElementNode *pelmDevice = pelmController->createChild("AttachedDevice");
5099 xml::ElementNode *pelmImage = pelmDevice->createChild("Image");
5121 void MachineConfigFile::buildDebuggingXML(xml::ElementNode *pElmParent, const Debugging *pDbg)
5126 xml::ElementNode *pElmDebugging = pElmParent->createChild("Debugging");
5127 xml::ElementNode *pElmTracing = pElmDebugging->createChild("Tracing");
5140 void MachineConfigFile::buildAutostartXML(xml::ElementNode *pElmParent, const Autostart *pAutostart)
5147 xml::ElementNode *pElmAutostart = pElmParent->createChild("Autostart");
5169 void MachineConfigFile::buildGroupsXML(xml::ElementNode *pElmParent, const StringsList *pllGroups)
5175 xml::ElementNode *pElmGroups = pElmParent->createChild("Groups");
5181 xml::ElementNode *pElmGroup = pElmGroups->createChild("Group");
5196 xml::ElementNode &elmParent,
5202 xml::ElementNode *pelmSnapshot = elmParent.createChild("Snapshot");
5227 xml::ElementNode *pelmChildren = pelmSnapshot->createChild("Snapshots");
5282 void MachineConfigFile::buildMachineXML(xml::ElementNode &elmMachine,
5284 std::list<xml::ElementNode*> *pllElementsWithUuidAttributes)
5328 xml::ElementNode *pelmTeleporter = elmMachine.createChild("Teleporter");
5343 xml::ElementNode *pelmFaultTolerance = elmMachine.createChild("FaultTolerance");
5984 * the member variables and then writes the XML file; it throws xml::Error instances on errors,
5999 xml::ElementNode *pelmMachine = m->pelmRoot->createChild("Machine");
6007 xml::XmlFileWriter writer(*m->pDoc);