Regex wildcard in XML Query
Glen Bojsza
gbojsza at gmail.com
Thu Oct 9 00:12:44 EDT 2014
Hello,
I am looking for any XML help that make the below query into a wild card
query.
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:gbadmin-api-3-1-0">
<soapenv:Header/>
<soapenv:Body>
<urn:GetTRParameters soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<id xsi:type="xsd:unsignedLong">878</id>
<q
xsi:type="xsd:string">IGD.NetDevice.1.NetCommonInterfaceConfig.</q>
</urn:GetTRParameters>
</soapenv:Body>
</soapenv:Envelope>
The number 1 in the line is where I would like to do a wildcard.
<q xsi:type="xsd:string">IGD.NetDevice.1.NetCommonInterfaceConfig.</q>
I have tried the changing the xsd:string to xsd:pattern and leave the 1 in
place and this gives the same results as the original query.
Also, using the following syntax I get the correct results but I am still
using 1 (or any number I want)
<q xsi:type="xsd:pattern">IGD.NetDevice.\1\.NetCommonInterfaceConfig.</q>
But I cannot figure out the syntax to replace the 1 so it is a wild card?
<q xsi:type="xsd:pattern">IGD.NetDevice.\d{2}\.NetCommonInterfaceConfig.</q>
This produces no results.
I don't know if this is a regex issue, an XML issue or both.
I welcome any and all suggestions as the alternative is to have an
incredibly slow response by having to retrieve everything.
thanks,
Glen
More information about the use-livecode
mailing list