Compartilhar via


Changing a Node Value Example for OMA DM

4/8/2010

This example shows how you can change the node value.

Note

You must enclose the GUID in the LocURI in brackets {}. You must also use the ASCII values of %7B and %7D respectively, as shown in the XML example. For example, if the GUID is "C556E16F-56C4-4edb-9C64-D9469EE1FBE0," you would change <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D</LocURI></Target> to <Target><LocURI>./Vendor/MSFT/EMAIL2/%7BC556E16F-56C4-4edb-9C64-D9469EE1FBE0%7D</LocURI></Target>

Code Example

<Atomic>
         <CmdID>100</CmdID>

         <Add>
            <CmdID>200</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">node</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
            </Item>
         </Add>

         <Replace>
            <CmdID>300</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/SERVICENAME</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>email acct 1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>400</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/SERVICETYPE</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>POP3</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>500</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/INSERVER</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>IncomingServer1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>600</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/OUTSERVER</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>OutgoingServer1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>700</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/AUTHNAME</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>authname1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>800</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/AUTHSECRET</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>password1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>900</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/REPLYADDR</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>someone@example.com</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>1000</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/NAME</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>John Q. Doe1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>1100</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/AUTHREQUIRED</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>1200</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/DWNDAY</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>1300</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/LINGER</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>60</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>1400</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/RETRIEVE</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>999</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>1500</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/DOMAIN</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>Domain1</Data>
            </Item>
         </Replace>

      </Atomic>
   
      <Atomic>
      <CmdID>1600</CmdID>
       <Replace>
            <CmdID>1700</CmdID>
            <Meta>
                <Format xmlns="syncml:metinf">chr</Format>
            </Meta>
            <Item>
                <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/INSERVER</LocURI></Target>
                <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_IncomingServer1</Data>
            </Item>
        </Replace>
        <Replace>
            <CmdID>1800</CmdID>
            <Meta>
                <Format xmlns="syncml:metinf">chr</Format>
            </Meta>
            <Item>
                <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/OUTSERVER</LocURI></Target>
                <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_OutgoingServer1</Data>
            </Item>
        </Replace>
        <Replace>
            <CmdID>1900</CmdID>
            <Meta>
                <Format xmlns="syncml:metinf">chr</Format>
            </Meta>
            <Item>
                <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/DOMAIN</LocURI></Target>
                <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_Domain1</Data>
            </Item>
        </Replace>
                 <Replace>
            <CmdID>2000</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/AUTHNAME</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_authname1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>2100</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/AUTHSECRET</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_password1</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>2200</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/REPLYADDR</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_someone@example.com</Data>
            </Item>
         </Replace>
         <Replace>
            <CmdID>2300</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/NAME</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">chr</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>NEW_John Q. Doe1</Data>
            </Item>
         </Replace>
                  <Replace>
            <CmdID>2400</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/AUTHREQUIRED</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>0</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>2500</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/DWNDAY</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>9</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>2600</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/LINGER</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>9</Data>
            </Item>
         </Replace>

         <Replace>
            <CmdID>2700</CmdID>
            <Item>
               <Target><LocURI>./Vendor/MSFT/EMAIL2/%7B(email account GUID)%7D/RETRIEVE</LocURI></Target>
               <Meta>
                  <Format xmlns="syncml:metinf">int</Format>
                  <Type xmlns="syncml:metinf">text/plain</Type>
               </Meta>
               <Data>99</Data>
            </Item>
         </Replace>
      </Atomic>  

Remarks

One provisioning XML file typically contains configuration information for multiple Configuration Service Providers. To use this example, you must replace the values as appropriate, and add the node as a child of the SyncBody node in an OMA DM provisioning file. For more information about the syntax of the provisioning file, see OMA DM Provisioning Files.

See Also

Concepts

OMA DM Provisioning Files

Other Resources

EMAIL2 Configuration Service Provider Examples for OMA DM