3 mensajes Página 1 de 1
How to using XML.InsertXML my default XML file is:
<products> 
  <product>
    <course id="SK-ENG-L1-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="1" titleKey="PE_ENG_1_course_title" language="en-US" resource="68cebc9173417426b9c277770e7aca3cc4847a03" encrypted="true">
<installed>false</installed>
</course>

Insert here below XML file:
<course id="SK-ENG-L2-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="2" titleKey="PE_ENG_2_course_title" language="en-US" resource="f626f5187b2ba7417f822324f964238fb6c16719" encrypted="true">  
 <installed>false</installed>
</course>

<activations> 
      <activation>
        <productID>SK-ENG-L1-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_1_course_title</titleKey>
        <courses>
          <course>SK-ENG-L1-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
 


Insert here below XML file:

<activation> 
        <productID>SK-ENG-L2-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_2_course_title</titleKey>
        <courses>
          <course>SK-ENG-L2-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
</activations>
</product>
  </products>
 

Result below XML file:
<products> 
  <product>
    <course id="SK-ENG-L1-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="1" titleKey="PE_ENG_1_course_title" language="en-US" resource="68cebc9173417426b9c277770e7aca3cc4847a03" encrypted="true">
<installed>false</installed>
</course>
<course id="SK-ENG-L2-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="2" titleKey="PE_ENG_2_course_title" language="en-US" resource="f626f5187b2ba7417f822324f964238fb6c16719" encrypted="true"> 
 <installed>false</installed>
</course>
<activations>
      <activation>
        <productID>SK-ENG-L1-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_1_course_title</titleKey>
        <courses>
          <course>SK-ENG-L1-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
<activation>
        <productID>SK-ENG-L2-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_2_course_title</titleKey>
        <courses>
          <course>SK-ENG-L2-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
</activations>
</product>
</products>

use logic and texfile.writefromstring or use the xml component using node interface.

please be more specific.

Imagen
ImagenImagenImagenImagen

Sorry Pabloko.
How to solve this problem?
My Default XML file is
<?xml version="1.0" encoding="UTF-8"?>
<products>
  <product>
    <course id="SK-ENG-L1-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="1" titleKey="PE_ENG_1_course_title" language="en-US" resource="68cebc9173417426b9c277770e7aca3cc4847a03" encrypted="true">
    <installed>false</installed>
</course>
<activations>
      <activation>
        <productID>SK-ENG-L1-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_1_course_title</titleKey>
        <courses>
          <course>SK-ENG-L1-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
<activations>
   </product>
</products>

will insert XML file is:
<?xml version="1.0" encoding="UTF-8"?>
<course id="SK-ENG-L2-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="2" titleKey="PE_ENG_2_course_title" language="en-US" resource="f626f5187b2ba7417f822324f964238fb6c16719" encrypted="true"> 
 <installed>false</installed>
</course>
<activations>
      <activation>
        <productID>SK-ENG-L2-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_2_course_title</titleKey>
        <courses>
          <course>SK-ENG-L2-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
</activations>

Result XML file is:
<?xml version="1.0" encoding="UTF-8"?>
<products>
  <product>
    <course id="SK-ENG-L1-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="1" titleKey="PE_ENG_1_course_title" language="en-US" resource="68cebc9173417426b9c277770e7aca3cc4847a03" encrypted="true">
<installed>false</installed>
</course>
<course id="SK-ENG-L2-NA-PE-NA-NA-Y-3.7.1.0.r29" levelIndex="2" titleKey="PE_ENG_2_course_title" language="en-US" resource="f626f5187b2ba7417f822324f964238fb6c16719" encrypted="true"> 
 <installed>false</installed>
</course>
<activations>
      <activation>
        <productID>SK-ENG-L1-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_1_course_title</titleKey>
        <courses>
          <course>SK-ENG-L1-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
<activation>
        <productID>SK-ENG-L2-NA-PE-NA-NA-Y-3</productID>
        <activationID/>
        <deactivationID/>
        <titleKey>PE_ENG_2_course_title</titleKey>
        <courses>
          <course>SK-ENG-L2-NA-PE-NA-NA-Y-3</course>
        </courses>
      </activation>
</activations>
  </product>
</products>

Imagen
I tried
XML.Load(SessionVar.Expand("%WindowsFolder%\\products.xml"));
XML.InsertXML("products/product/course", "<course id=\"SK-ENG-L2-NA-PE-NA-NA-Y-3.7.1.0.r29\" levelIndex=\"2\" titleKey=\"PE_ENG_2_course_title\" language=\"en-US\" resource=\"f626f5187b2ba7417f822324f964238fb6c16719\" encrypted=\"true\">\r\n<installed>false</installed>\r\n</course>", XML.INSERT_AFTER);
XML.InsertXML("products/product/activations/activation", "<activation>\r\n<productID>SK-ENG-L2-NA-PE-NA-NA-Y-3</productID>\r\n<activationID/>\r\n<deactivationID/>\r\n<titleKey>PE_ENG_2_course_title</titleKey>\r\n<courses>\r\n<course>SK-ENG-L2-NA-PE-NA-NA-Y-3</course>\r\n</courses>\r\n</activation>", XML.INSERT_AFTER);
XML.Save(SessionVar.Expand("%WindowsFolder%\\rsapp3\\products.xml"));
Parsed in 0.003 seconds, using GeSHi 1.0.8.9

But Result is not changed
3 mensajes Página 1 de 1

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 2 invitados

cron