Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to create a special format attribute in XML file

$
0
0
I am still new to AutoIT. I have included _XMLDomWrapper.au3 in my script and tried using _XMLCreateAttrib and _XMLCreateChildWAttr methods.

I need to add the below attribute into the XML file after the "ip" attribute.

Attribute:
<displayFieldUUID name="task">A23ET45</displayFieldUUID>

XML File:
<?xml version="1.0" encoding="UTF-8" ?>
- <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mapping_schema.xsd">
  <version>1.0</version>
  <publisher name="ABCD" />
  <action>EXPORT_FROM_A</action>
- <application CRUDOptions="IGNORE" name="Application">
  <applicationUUID>2F57FE87</applicationUUID>
- <searchField>
  <displayFieldUUID name="ip">B405EFDB</displayFieldUUID>
  <displayFieldUUID name="criticality">E94E9D77</displayFieldUUID>
  </searchField>
  </application>
  </configuration>

I tried the following method but it gives error.

$strAttribName = "task"
$strAttribValue = "A23ET45"

_XMLCreateAttrib("//configuration/application/searchField/displayFieldUUID", $strAttribName, $strAttribValue)

-bhumis

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>