Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all 935 articles
Browse latest View live

Unable to read values from the XML which is passed as a parameter to the XSLT

$
0
0

I need a help with the below situation.

I have two sources of XML which I am passing to the XSLT and read the values from both the XMLs by mapping the common field and derive the output, but I am not able to read the values from the XML file which is passed as the parameter to the XSLT.

Here is what I have tried…everything is working except that I am not able to map and read the values from the file which is passed as a parameter…

In this case, I am passing one of the XML as a parameter to the XSLT( which is File1, the content of File1 is given below) ...

C# Code:

privatestring TransformXML(string xml,string PathClient, string strKeyId)

       {

         

           //read XML

           TextReader tr1 = newStringReader(xml);

           XmlTextReader tr11 = newXmlTextReader(tr1);

           XPathDocument xPathDocument = newXPathDocument(tr11);

           

           //read XSLT

           XmlTextReader tr22 = newXmlTextReader(PathClient);

           XslCompiledTransform xslt = newXslCompiledTransform();

           XsltSettings xsettings = newXsltSettings(false,true);

           xsettings.EnableDocumentFunction = true;

           xslt.Load(tr22, xsettings, new XmlUrlResolver());

           //create the output stream

           StringBuilder sb = newStringBuilder();

           TextWriter tw = newStringWriter(sb);

           //Add doc....

           XmlDocument ptrDoc = newXmlDocument();

           ptrDoc.Load(@"C:/Users/PX/MYDOCUMENTS/1_File_1.xml");

           //xsl.Transform (doc, null, Console.Out);

           XsltArgumentList args = newXsltArgumentList();

           args.AddParam("ParamPKeyName","", strKeyId);

           args.AddParam("File1","", ptrDoc);

           

     

           xslt.Transform(xPathDocument, args, tw);

           return sb.ToString();

           

       }

File1 source (which is passed as parameter to the xslt):

<DATA>

<CHILD PNUM="1" PKID="" PKID1="" PKID2="" PName1="" PName2="" PName3="" PAdd1="" PAdd2="" PCity=""

PID="Form" />

   <CHILD PNUM="" PKID="" PKID1="" PKID2="" PName1="" PName2="" PName3="" PAdd1="" PAdd2="" PCity=""

PID="Line" />

   <CHILD PNUM="" PKID="" PKID1="" PKID2="" PName1="" PName2="" PName3="" PAdd1="" PAdd2="" PCity=""

PID="Code" />

   <CHILD PNUM="P No" PKID="PKey ID" PKID1="Other ID" PKID2="Other ID - 2" PName1="P Name Line 1"

PName2="P Name PAdd1="Street Address 1" PAdd2="Street Address 2" PCity="City" PID=""/>

  <CHILD PNUM="" PKID="PDetails" PKID1="" PKID2="" PName1="" PName2="" PName3="" PAdd1="" PAdd2=""

PCity="" PTD_USFORIND="" PTDI_ADDST="" PTDI_ADDZIP="" PID="Fund" PTDI_CUST5="" />

  <CHILD PNUM="1" PKID="1" PKID1="" PKID2="" PName1=" Name Line 1# " PName2="Name Line 1b" PName3=""

PAdd1=" 1 Mai$n S.t" PAdd2="Apt 1" PCity="NewCity" PID="1" />

   <CHILD PNUM="2" PKID="2" PKID1="" PKID2="" PName1="Name Line 2a" PName2="" PName3="" PAdd1="2 Main St"

PAdd2="" PCity="Berlin" PID="2" />

   <CHILD PNUM="3" PKID="3" PKID1="" PKID2="" PName1="First Middle Last" PName2="" PName3="" PAdd1="3

Main St" PAdd2="" PCity="Los Angeles" PID="3" /> 

 </DATA>

Now the source XML is as follows…

Source XML:

<XMLContent>

<CONTENT1>

 <DATA PRJTID="217" REGID="F_DATA">

   <CHILD PNUM="" PKID="" PKID1="" PKID2="" PName1="" PName2="" P_DOMFOR="" DP1="" DP2=""/>

   <CHILD PNUM="" PKID="" PKID1="" PKID2="" PName1="" PName2="" P_DOMFOR="" DP1="" DP2=""/>

   <CHILD PNUM="" PKID="" PKID1="" PKID2="" PName1="" PName2="" P_DOMFOR="" DP1="" DP2=""/>

   <CHILD PNUM="P No" PKID="P Key ID" PName1="Name Line 1" PName2="Name Line 2" P_DOMFOR="Domestic" />

   <CHILD PNUM="ROUNDING VAL" PKID="" PKID2="" PName1="TOTALS" PName2="" P_DOMFOR="" DP1="" DP2=""/>

   <CHILD PNUM="1" PKID="1" PKID1="" PKID2="" PName1="Name Line 1a" PName2="Name Line 1b"

P_DOMFOR="Domestic"  DP1="10" DP2="20"/>

   <CHILD PNUM="2" PKID="2" PKID1="" PKID2="" PName1="Name Line 2a" PName2="" P_DOMFOR="Foreign" 

DP1="100" DP2="200"/>

   <CHILD PNUM="3" PKID="3" PKID1="" PKID2="" PName1="First Middle Last" PName2="" P_DOMFOR="Domestic" 

DP1="1000" DP2="2000"/> 

 </DATA>

</CONTENT1>

</XMLContent>

The output I am looking for is –

Expected output:

For each of the PKID in the source XML,

For ex: when PKID=1

<Root>

   <ContentValues>

    <Name>

               Get the corresponding value of the PKID=1 of PName1 attribute from the Input XML which is = Name Line 1#

 </Name>

  

<Value1>

 Get the value of PKID=1 of DP1 (from the Source XML)

 </Value1>

<Value2>

Get the value of PKID=1 of DP2 (from the Source XML)

 </Value2>

</ContentValues>

</Root>

So for the selected PKID=1, 2, the output will be -

<Root>

   <ContentValues>

    <Name>

               Name Line 1#

 </Name>

   

<Value1>

 10

 </Value1>

<Value2>

20

 </Value2>

</ContentValues>

<ContentValues>

    <Name>

               Name Line 2a </Name>

    <Value1>

 100

 </Value1>

<Value2>

200

 </Value2>

</ContentValues>

</Root>

The XSLT code that I have tried is –

XSLT Code:

<?xml version="1.0" encoding="utf-8"?>

 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

     xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"

     xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"

 >

   <xsl:output method="xml" indent="yes"/>

 

<xsl:param name="File1" select="msxsl:node-set('')"/>

   

  <xsl:variable name="id-list" select="concat(',', $ParamPKeyName, ',')"/>

 

   <xsl:template match="/">

  

         <Return>

           <xsl:apply-templates select="XMLContent/CONTENT1/DATA/CHILD[(string(number(@PNUM)) != 'NaN') and (@PNUM != '') and contains($id-list, concat(',', @PNUM, ','))]"/>

         </Return>

     

  

   </xsl:template>

   <xsl:template match="CHILD">

     <xsl:variable name="RecordNo">

       <xsl:value-of select="position()"/>

     </xsl:variable>

    <xsl:variable name="PNo" select="@PNUM"/>

  <Root>

   <ContentValues>

    <Name>

 <xsl:copy-of select="File1"/> ( I am able to get the complete set of File-1 which is passed as parameter to XSLT, but not the Name Line 1# value)

 </Name>

  

                        <Value1>

 <xsl:value-of select="@DP1"/>

 </Value1>

                         <Value2>

 <xsl:value-of select="@DP2"/>

 </Value2>

                </ContentValues>

         </Root>

   </xsl:template>

 </xsl:stylesheet>

Could you please help with this, also if I load around 15000 records (CHILD elements) will that affect the performance)


Rpaul


How can I 1)read & 2)parse the XML file and 3) put the parsed data into datatable in “ C++ ”.

$
0
0
  1. Actually I can find these things with C#,VB.net but i need to be done this in " C++ ".
  2. I am doing these operations on XML file using PUGIXML but I need to do this without using these PUGIXML,RAPIDXML etc for performance reasons.
  3. Please, provide me proper way/links/manuals/guides/material regarding these operations on XML files specially "Datatable" concept in C++ . While surfing all who suggests solution are talking about C# .NET etc.
  4. It will be better if anyone can provide me a sample code/example (if anyone done this before) for the same.

The processing instruction target matching "[xX][mM][lL]" is not allowed

$
0
0

Error WS Betha NFSe: 

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<ConsultarLoteRpsResposta xmlns="http://www.betha.com.br/e-nota-contribuinte-ws">
    <ListaMensagemRetorno>
        <MensagemRetorno>
            <Codigo>00000</Codigo>
            <Mensagem>Erro desconhecido The processing instruction target matching "[xX][mM][lL]" is not allowed.</Mensagem>
            <Correcao>Este erro será analisado e corrigido.</Correcao>
        </MensagemRetorno>
    </ListaMensagemRetorno>
</ConsultarLoteRpsResposta>

How to add attribute to an XMLNode

$
0
0

 

Hi

 

I have XML document which has following structure 

 

  <Item>
          <Type>Tyre</Type>
          <Level>10</Level>
  </Item>

  <Item>
          <Type>Ring</Type>
          <Level>09</Level>
  </Item>

 

I need to change this to

 

  <Item>
          <Level Type="Tyre" >10</Level>
  </Item>

  <Item>
           <Level Type="Ring">09</Level>
  </Item>

 

Any ideas?

 

I am using XmlDocument to create an XML document from string.

 

Thanks,

Prasad

 

XElement InnerText

$
0
0
How is this set? For example, if I have this XmlElement code:

XmlElement element = MethodToBuildElement();
element["something"].InnerText = "stuff";

How is this done with the XElement class as opposed to this way?

TIA!!!

Different behaviour of XSD validation on Windows8

$
0
0

Good morning,

I found that XSD validation on Windows8 (probably because of different MSXML6 version?) behaves differently from previous OSes with respect to fixed attributes defined in XSD.

If you define an attribute with a fixed value in XSD and apply it to an XML instance, all validated XML nodes will get that attribute "auto-magically". I used this feature to give a sort of "class attributes" to XML nodes without defining them explicitly in the XML document.

1) if you add a new node of a valid type, on previous versions it will get fixed attributes automatically without doing anything. On Windows8 I have to call validateNode() everytime to apply them

2) if a validate() fails, none of the nodes of the document will get fixed attributes. On previous versions, every valid node get them even if validation has failed

Is there a reason for this? Is it a bug? Is it possible to restore previous behaviour?

Thanks

Davide

.XML needs fixing - missmatched tag

$
0
0

can someone help me figure this XML out, getting incorrect tags and i cant seem to fix it on line 17.

<?xml version="1.0" encoding="utf-8"?><PreferenceScreen
  xmlns:android="http://schemas.android.com/apk/res/android"><PreferenceCategory android:title="Advanced Power Menu Display"><SwitchPreference android:title="The new style menu display Power" android:key="aurora_power_menu_style" android:summary="The new style is already in force shutdown menu" android:summaryOn="The new style is already in force shutdown menu" android:summaryOff="The new style has failed Shutdown menu" /></PreferenceCategory><PreferenceCategory android:title="Advanced Power Menu" /><CheckBoxPreference android:title="Shutdown" android:key="menu_power" android:summary="Show or hide the shutdown options" android:summaryOn="Shutdown item has been shown" android:summaryOff="Shutdown item has been hidden" /><CheckBoxPreference android:title="Data network switches" android:key="menu_data" android:summary="Show or hide the 3G switch" android:summaryOn="Data switches has been shown" android:summaryOff="Data switch is hidden" /><CheckBoxPreference android:title="Airplane mode" android:key="menu_airplane" android:summary="Show or hide the flight mode option" android:summaryOn="Flight mode has been shown" android:summaryOff="Flight mode has been hidden" /><CheckBoxPreference android:title="Restart" android:key="menu_restart" android:summary="Show or hide the Restart option" android:summaryOn="Restart has been shown" android:summaryOff="Restart has been hidden" /><CheckBoxPreference android:title="Screenshots" android:key="menu_screenshot" android:summary="Screenshot option to show or hide" android:summaryOn="Screenshot been shown" android:summaryOff="Screenshots have been hidden" /><CheckBoxPreference android:title="flashlight" android:key="menu_torch" android:summary="Show or hide the flashlight option" android:summaryOn="It has been shown flashlight" android:summaryOff="Flashlight has hidden" /><CheckBoxPreference android:title="Screen Recorder" android:key="menu_record" android:summary="Show or hide screen recording options" android:summaryOn="Screen video has been shown" android:summaryOff="Screen Recorder has been hidden" /><CheckBoxPreference android:title="Emergency Mode" android:key="menu_emergency" android:summary="Show or hide the emergency mode switch" android:summaryOn="Emergency mode has been shown" android:summaryOff="Emergency mode has been hidden" /><CheckBoxPreference android:title="Ringtone mode options" android:key="menu_mode" android:summary="Show or hide the ring pattern options" android:summaryOn="Ringtone mode option has been shown" android:summaryOff="Ringtone mode option has been hidden" /></PreferenceCategory></PreferenceScreen>

Using a ECDSA Certifcate to Digtially Sign a XML Request

$
0
0

Hi,

I have been trying to work out how to create the following xml structure via the SignedXml class provided by the framework. The issue that I have is that the certificate type is an ECDSA one and from my research it is not widely supported like RSA and DSA is.

I have attempted to use the ECDsaCng class as the key algorithm via my own implementations of SignatureDescription, AsymmetricSignatureFormatter and AsymmetricSignatureDeformatter and I can sign and verify my own Xml. However when the xml is sent to a third party (who uses Java) it does not verify on their side (using the public key).

The below XML is inserted immediately after the body tag.

 <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
     <SignedInfo>
         <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n# "/>
         <SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
         <Reference URI="">
           <Transforms>
             <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
           </Transforms>
           <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
           <DigestValue>tOyRD3mq3MFXHUWDfgRVHzqN0Dt5kOzE1rxuJ7FYAjI=</DigestValue>
         </Reference>
       </SignedInfo>
      <SignatureValue>hfluuINc7W/+8fklmrXKoW+M9JM4RR1YdnGp15Y8CXd7hXY717srDT6lAkNWSIWY8d5UFVHx9jd4HeTJ3GLzxQ==</SignatureValue>
       <KeyInfo>
         <X509Data>
           <X509IssuerSerial>
             <X509IssuerName>CN=XXXXXX, OU=XXXX XXXX, O=XXXX XXXX, C=UK</X509IssuerName>
             <X509SerialNumber>123123123</X509SerialNumber>
           </X509IssuerSerial>
         </X509Data>
       </KeyInfo>
   </Signature>

I'm willing to post all of my code somewhere for Microsoft to look at, just don't know where.

Can a signature by created as above with ECDSA?

Regards,

Hyder


Change the xml processing instructions using msxml (c++)

$
0
0

Hi All,

Please help to change the xml processing instruction using msxml. c++

<?xml-stylesheet type="text/xsl" href="D:\SAMPLE.xsl"?

This  href="D:\SAMPLE.xsl" need to change to  href="D:\new.xsl"

mydummy.xml  ( input xml)

................

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="D:\SAMPLE.xsl"?>
<Data>
<Header>
</Header>
<Values
</values>
</Data>

mydummy.xml  ( expected output xml after modifying style sheet value)

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="D:\new.xsl"?>
<Data>
<Header>
</Header>
<Values
</values>
</Data>

How do I display correct output using xslt code

$
0
0

I would like to get correct output but my template is returning wrong output.
Correct output should be

<EditReport><MessageIdentification>Case:1097</MessageIdentification><SourceLocation>111</SourceLocation><SourceUser>Tester</SourceUser><EditResult><EditNumber>001</EditNumber><ItemIdentification/><Result>Fail</Result></EditResult></EditReport>

I am getting the following output which is wrong because Result node should say Fail

<EditReport><MessageIdentification>Case:1097</MessageIdentification><SourceLocation>111</SourceLocation><SourceUser>Tester</SourceUser><EditResult><EditNumber>001</EditNumber><ItemIdentification/><Result>Pass</Result></EditResult></EditReport>

xml document

<Integration><ControlPoint Timestamp="10/13/2016 11:00:15 AM" UserID="Tester"/><Case><CaseNumber>1097</CaseNumber><Court><NodeID>111</NodeID></Court></Case><IntegrationConditions><NotificationEvent notificationType="CasePartyUpdates">CasePartyUpdate</NotificationEvent></IntegrationConditions></Integration>

xslt code

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0"><xsl:output method="xml"/><xsl:variable name="gEditPass">Pass</xsl:variable><xsl:variable name="gEditFail">Fail</xsl:variable><xsl:variable name="gMessageIdentification">Case:<xsl:value-of select="Integration/Case/CaseNumber"/></xsl:variable><xsl:template match="/"><EditReport><MessageIdentification><xsl:value-of select="$gMessageIdentification"/></MessageIdentification><SourceLocation><xsl:value-of select="Integration/Case/Court/NodeID"/></SourceLocation><SourceUser><xsl:value-of select="Integration/ControlPoint/@UserID"/></SourceUser><!-- Edit number 001 --><xsl:call-template name="EditPartyUpdate"/></EditReport></xsl:template><!-- E D I T   N U M  B  E  R  001 --><xsl:template name="EditPartyUpdate"><xsl:variable name="vPOSendEventCount"><xsl:value-of select="count(NotificationEvent[(@notificationType='ProtectionOrder') or (@notificationType='ProtectionOrderInactivation')])>0"/></xsl:variable><xsl:variable name="vPartyUpdateEventCount"><xsl:value-of select="count(NotificationEvent[@notificationType='CasePartyUpdates'])>0"/></xsl:variable><xsl:for-each select="Integration/IntegrationConditions/IntegrationCondition/NotificationEvent"><EditResult><EditNumber>001</EditNumber><ItemIdentification></ItemIdentification><Result><xsl:choose><xsl:when test="$vPartyUpdateEventCount=0"><xsl:value-of select="$gEditFail"/></xsl:when><xsl:otherwise><xsl:value-of select="$gEditPass"/></xsl:otherwise></xsl:choose></Result></EditResult></xsl:for-each></xsl:template></xsl:stylesheet>

How do I add one more condition to my when count statement?

$
0
0

I have a when statement that I would like to add one more condition.
I would like to add CaseParty with an Op='A' to my existing count.
How do I do that?

Here is my xslt when test count statement

<xsl:when test="(count(CaseParty[((ObservedRace/@Op='E') or (ObservedEthnicity/@Op='E')) and (Connection/@Word='RSP')] )>0)">


Here is my xml document


<Integration>
<Case>
    <CaseParty ID="7470">
<ObservedRace Word="W" Op="E">White</ObservedRace>
<ObservedEthnicity Word="NH">Non Hispanic</ObservedEthnicity>
<Connection Word="RSP"/>
</CaseParty>
<CaseParty ID="111" Op="A">
<Connection Op="A" Word="CHD">
<Description>Child</Description>
</Connection>
</CaseParty>
</Case>
</Integration>




xml validation issue

$
0
0

Hi,

below is the sample code i am using,

xsd:

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="UsersList"><xs:complexType><xs:sequence><xs:element name="User"><xs:complexType><xs:sequence><xs:element ref="Name" /><xs:element ref="BirthTime" /></xs:sequence></xs:complexType></xs:element></xs:sequence></xs:complexType></xs:element><xs:element name = "Name"><xs:simpleType><xs:restriction base = "xs:string"><xs:pattern value="[a-zA-Z0-9]*"/></xs:restriction></xs:simpleType></xs:element><xs:element name="BirthTime"><xs:simpleType><xs:restriction base="xs:string"><xs:pattern value="(0[0-9]|[1][0-9]|2[0-3]):[0-5][0-9]"/></xs:restriction></xs:simpleType></xs:element></xs:schema>

xml:

<?xml version="1.0" encoding="utf-8"?><UsersList><User><Name>sam</Name><BirthTime>20:11</BirthTime></User><User><Name>wit</Name><BirthTime>10:11</BirthTime></User></UsersList>

c# code to validate

XmlSchemaSet schemas = new XmlSchemaSet();
                schemas.Add("", @"D:\XmlTesting\user.xsd");

                XDocument doc = XDocument.Load(@"D:\XmlTesting\user.xml");
                string msg = "";
                doc.Validate(schemas, (o, es) =>
                {
                    msg += es.Message + Environment.NewLine;
                });

                MessageBox.Show(msg == "" ? "Document is valid" : "Document invalid: " + msg);

when i try to validate, i am getting the following error,

The element 'UsersList' has invalid child element 'User
please advice me what am i doing wrong.


loving dotnet

Multiple text with same tag XSL

$
0
0

How do i write XSL for the following

<ti>
<a>00732094000375</a>
<ati code="XYZ">122</ati>
<ati code="ABC">165</ati>

</ti>

can you help me get the value of only ABC using XSL.

conditional based validation

$
0
0
Hi,

Assume, i have following two fields 
IsFixed, Reason

IsFixed will have have enum value like "Y" or "N"

So if IsFixed  has "N" in the xml then "Reason" element should have value. If not then it can be empty.

How do i write xsd for this condition. Any help please

loving dotnet

Read nested list

$
0
0

Hi,

Below the sample code to play with

<?xml version="1.0" encoding="utf-8"?><UsersList><User><UserName>Bob</UserName><UserAge>34</UserAge><FamilyList><Family><FamilyName>Family1</FamilyName><members>5</members><type>2</type></Family><Family><FamilyName>Family2</FamilyName><members>10</members><type>3</type></Family></FamilyList></User><User><UserName>Rob</UserName><UserAge>35</UserAge><FamilyList><Family><FamilyName>Family1</FamilyName><members>5</members><type>2</type></Family><Family><FamilyName>Family2</FamilyName><members>10</members><type>3</type></Family></FamilyList></User></userList>

cs:

 

public partial class User
    {
        public string UserName{ get; set; }
        public string UserAge{ get; set; }

        public List<Family> FamilyList{ get; set; }
    }

public partial class Family
    {
        public string FamilyName{ get; set; }
        public string members{ get; set; }

        public string type{ get; set; }
    }

sample c# code i triedand not working 

 XElement xelement = XElement.Load(@"D:\users.xml");
            IEnumerable<User> UserList = (from element in xelement.Descendants("User")
                                              select new user
                                              {
                                                  UserName= element.Element("UserName").Value,
                                                  UserAge= element.Element("UserAge").Value,

                                                  FamilyList= (from fm in element.Elements("FamilyList")
                                                                     select new FamilyList
                                                                     {
                                                                         FamilyName=fm.Element("FamilyName"),
                                                                         members=fm.Element("members"),
                                                                         type=ing.Element("type")
                                                                     }).ToList()
                                              }).ToList();

I need to read this xml using linq to xml concept. i have tried ling to xml ways and getting null values when getting the family. basically struggling to get nested list

any sample code will be much helpful



loving dotnet



XSD help

$
0
0
<item>
3<abc>375</abc>
4<source>
5<id agency="vendor1">901223</id>
6<id agency="vendor2">5079</id>
7</source>

8</item>

i have an xml of this format,i need to put this data into a table with the following structure , i am using ssis to load the data, could you

help me write xsd for this, the agency can be dynamic, it can bring one or multiple.

agency value

vendor1 901223

vendor2 5079

Adding button to a custom tab in excel

$
0
0

<?xml version="1.0"?><customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"><ribbon><tabs><tab insertBeforeMso="TabHome" label="T-K" id="customTab"><group label="Raw Data" id="customGroup3"><box id="box1" boxStyle="vertical"><labelControl label="RM Settings..." id="label1"/><dropDown label="Region" id="dropDown" onAction="dd_onChange"><item label="G" id="item1"/><item label="CN" id="item2"/><item label="EM" id="item3"/><item label="La" id="item4"/><item label="SE" id="item5"/></dropDown></box><separator id="separator"/><button label="Refresh Raw Data" id="customButton9" onAction="ReFreshButton" imageMso="ListSynchronize" size="large"/><button label="Re-List Raw Data" id="customButton6" onAction="ReListButton" imageMso="SourceControlRefreshStatus" size="large"/></group><group label="Builder" id="customGroup1"><button label="Add Column" id="customButton1" onAction="AddColumnButton" imageMso="TableDrawTable" size="large"/><button label="Remove Selected Column" id="customButton2" onAction="RemoveColumnButton" imageMso="InkEraseMode" size="large"/><button label="Refresh" id="customButton7" onAction="CleanFormulationsButton" imageMso="Consolidate" size="large"/><menu label="Send to BOM" id="Menu3" imageMso="ProposeNewTime" size="large"><button label="Send Selected" id="Button10" onAction="TransferselectedButton" imageMso="ObjectsSelect"/><button label="Send All" id="Button18" onAction="TransferAllButton" imageMso="Repaginate"/></menu></group><group label="BOM" id="customGroup2"><button label="BBB" id="customButton3" onAction="BBButton" imageMso="ControlsGallery" size="large"/><button label="Show Rows" id="customButton4" onAction="ShowRowsButton" imageMso="FillDown" size="normal"/><button label="Hide Rows" id="customButton5" onAction="HideRowsButton" imageMso="FillUp" size="normal"/><button label="Normalise" id="customButton8" onAction="Normalise" imageMso="TableStyleTotalsRow" size="large"/><menu label="Enter by..." id="Menu1" imageMso="SignatureInsertMenu" size="large" itemSize="large"><button label="Enter by Name" id="Button14" onAction="Enter_by_Name" imageMso="FormControlLabel"/><button label="Enter by AC value" id="Button15" onAction="Enter_by_ACOAT" imageMso="QuickStylesGallery"/></menu></group><group label="Archive" id="customGroup5"><button label="BBB" id="customButton12" onAction="BBAButton" imageMso="ControlsGallery" size="large"/></group><group label="Data" id="customGroup4"><button label="Open DKM Tools" id="customButton10" onAction="GoToDB" imageMso="HyperlinkInsert" size="large"/><button label="Send to Database" id="customButton11" onAction="Publish" imageMso="DatabaseSqlServer" size="large"/></group><group label="Cost" id="customGroup6"><button label="Update Cost Tool" id="customButton15" onAction="CostButton" imageMso="ListSynchronize" size="large"/><button label="Show Rows" id="customButton13" onAction="CostShowButton" imageMso="FillDown" size="normal"/><button label="Hide Rows" id="customButton14" onAction="CostHideButton" imageMso="FillUp" size="normal"/></group></tab></tabs></ribbon></customUI>

Above is the XML code for a custom tab called the T-K tab. By that I mean it appears next to the "Home" tab.

I want to add another button into the T-K tab, into custom group 1 (in bold). How do I go about doing that?

I am thinking that below this line

<button label="Refresh" id="customButton7" onAction="CleanFormulationsButton" imageMso="Consolidate" size="large"/>

I just put for example the following

<button label="NEWBUTTON" id="customButton30" onAction="NEWBUTTON" imageMso="Consolidate" size="small"/>

What do I need to do in terms of vba code?


validation questions

$
0
0

Hi,

I have below elements in my xml

<UserName></UserName><Age></Age><BirthTime></BirthTime>

<Description></Description>

User name value should not be empty.

Age should be integer and should not be empty

BirthTime should be in HH:MM format and can be empty

Description should not empty and should be allowed multilines in the same tag.

--- Not null or empty string<xs:simpleType name="stringval"><xs:restriction base="xs:string"><xs:pattern value="[\s\S]*[^ ][\s\S]*" /></xs:restriction></xs:simpleType>

-- BirthTime<xs:simpleType name="HHMM"><xs:restriction base="xs:string"><xs:pattern value="(0[0-9]|[1][0-9]|2[0-9]):[0-5][0-9]" /></xs:restriction></xs:simpleType>

-- Age

<xs:simpleType name="Integet"><xs:restriction base = "xs:string"><xs:pattern value = "[0-9]*"</xs:restriction></xs:simpleType>

Birth time doesn't allowing empty

description doesn't allowing multiline in the same tag.

Any suggestion please

 


loving dotnet


Empty Elements with self closing tags

$
0
0

I will like to add a self-closing tag to an empty elements   using DOM  C#

 
Example:


<tag test"ttt"> </tag>

<tag test"ttt"/>

Newbie - How to communicate a non .asmx SOAP Web service

$
0
0

I need to access a pre-existing SOAP web service, but it has a .dll extension, not asmx.

The intention is to connect it with xamarin forms in C#, but the problem is that I can't really even get started understanding how to say hello to this SOAP service. Even to just send one simple command would be just the start I need.

Here is an extract from the webservice listing:

<message name="Login0Request">

<part name="UserName" type="xs:string"/>
<part name="Password" type="xs:string"/>
<part name="IPs" type="xs:string"/>
</message>
<message name="Login0Response">
<part name="return" type="xs:string"/>
</message>
<message name="RegisterNewCustomer1Request">
<part name="Email" type="xs:string"/>
<part name="Password" type="xs:string"/>
<part name="FirstName" type="xs:string"/>
<part name="LastName" type="xs:string"/>
<part name="Mobile" type="xs:string"/>
<part name="CountryID" type="xs:int"/>
<part name="aID" type="xs:int"/>
<part name="SignupIP" type="xs:string"/>
</message>

All the guides for SOAP in Xamarin relate to asmx types, but never dlls.

Any ideas?

Help would be very much appreciated!

Viewing all 935 articles
Browse latest View live


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