Multiple Attributes for an Element
Hi,
I am trying to create an XML Document with an Element having multiple
attributes -
<field name="dept">1</field>
<field name="firstname">Barbara</field>
<field name="lastname">Streisand</field>
<field name="age">59</field>
In my code I am trying something like this :-
Element field2 = document.createElement("field");
field2.setAttribute("name", "firstname");
rootElt.appendChild (field2);
rootElt.appendChild(document.createTextNode (firstname));
Any Advice !!
-Thanks
You didn't seem to have a problem, but you asked for advice. So here's my advice: Use meaningful element names.
<Department>1</Department>
<Firstname>Barbara</Firstname>
<Lastname>Streisand</Lastname>
<Age>59</Age>
Similar Messages
-
Query column value as attribute for an element
I want to select out a column to be an attribute for an element in my XML file. I know that if I use "@column_name" I will get an attribute but it will be for the row's element. In this case I don't want. In my example below I want a column called DATE_TYPE to be the attribute for the column DATE that is an element. How would I do this? If I select out @DATE_TYPE I get it as an attribute of the <element1> node.
<element1>
<element2>VALUE</element2>
<date>2003-09-02</date>
</element1>As Darrin said, it just matters which element is considered the "active" element. So in your second example, you actually wrote to it a 3 and then a 1 (classic race condition). You can set the active element with a property of the array (having trouble finding it at the moment).
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
How to insert multiple attributes to root elements
Hi,
I have to costruct a request to a service in which all the multipul ements shold be populated as attributes.
The elements should be retrived from response from an intermediate service callout.
Is there any function to do that..Try this. Be careful that your element does not go deeper than 1 desendant or else you will get concatenating data.
for $mydoc in $root
return element { node-name($mydoc) } (: element constructor notation :)
{ $mydoc/@*, (:add existing attributes :)
for $el in $mydoc/* (: element constructor sub-nodes :)
return attribute {local-name($el)}{data($el)}
I used http://www.xqueryfunctions.com/xq/functx_add-attributes.html as a guide. -
Is there a bug with firefox when supporting "aria-labelledby" attribute for span element?
I use firefox 10.0.3, and using JAWS 13 to read the screen.
I set the "aria-labelledby" attribute for the span, and only first element content was read even I set three 'id' for this attribute. This can work well under IE8.
<pre><table role="grid" summary="Details table">
<tr>
<td type="columnTitle"><span tabIndex="0" role="gridcell">Date</span></td>
<th id="_NS_hdr1" role="columnheader" type="columnTitle"><span tabIndex="-1" role="columnheader">3/4</span></th>
<th id="_NS_hdr2" role="columnheader" type="columnTitle"><span tabIndex="-1" role="columnheader">3/11</span></th>
<th id="_NS_hdr3" role="columnheader" type="columnTitle"><span tabIndex="-1" role="columnheader">3/18</span></th>
<th id="_NS_hdr4" role="columnheader" type="columnTitle"><span tabIndex="-1" role="columnheader">3/25</span></th>
</tr>
<tr>
<th id="_NS_hdr5" role="rowheader" type="columnTitle"><span tabIndex="-1" role="rowheader">Count</span></th>
<td headers="_NS_hdr1 _NS_hdr5" type="datavalue">
<span tabIndex="-1" id="_NS_N158B5CC0.1614A0C80" role="gridcell" aria-labelledby="_NS_hdr1 _NS_hdr5 _NS_N158B5CC0.1614A0C80">0</span>
</td>
<td headers="_NS_hdr2 _NS_hdr5" type="datavalue">
<span tabIndex="-1" id="_NS_N158B5CC0.1614A1200" role="gridcell" aria-labelledby="_NS_hdr2 _NS_hdr5 _NS_N158B5CC0.1614A1200">75</span></td>
<td headers="_NS_hdr3 _NS_hdr5" type="datavalue">
<span tabIndex="-1" id="_NS_N158B5CC0.1614A1780" role="gridcell" aria-labelledby="_NS_hdr3 _NS_hdr5 _NS_N158B5CC0.1614A1780">231</span>
</td>
<td headers="_NS_hdr4 _NS_hdr5" type="datavalue">
<span tabIndex="-1" id="_NS_N158B5CC0.1614A1D00" role="gridcell" aria-labelledby="_NS_hdr4 _NS_hdr5 _NS_N158B5CC0.1614A1D00">81</span>
</td>
</tr>
</table></pre>Hi MacroZ,
I understand your point. JAWS support different ways to navigate the page, such as use 'tab' key to navigate clickable items, or use 'Ctrl+Alt+arrow keys' to navigate the data table cells.
I removed the 'gridcell' role from data cells and when I use 'Ctrl+Alt+arrow keys', it works well(I move to one cell, and it can read column title, then row title, then cell value). So it's acceptable because at least we have one way to read this data table :)
There is one more thing I want to ask, I have one page that include one iframe, and the page inside the iframe has several hyper links, I start JAWS13, then use 'tab' key to navigate these links inside the iframe page, when I navigate to one link, I press 'enter' key to goto the new page, then I found all links in the new page do not work when I navigate to any of them and press 'enter' key(it can works well when using mouse click). Seems there's no problem under IE8, I'm not sure this issue comes from JAWS or firefox, so hope you can help to confirm on this, many thanks! -
Bindable attribute for BSP elements in BSP extensions
Hey all
Can anyone explain what the 'Bindable' attribute in BSP elements, in BSP extensions, is for? It has no F1 help documentation and is not documented in the SAP library with the rest of the BSP element attributes.
Many thanks
MarkWhich field is? Has translate value content to spanish for this field?.
In SAP CRM UI, press F2 and tell me which is the field -
How to main multiple attributes for set type R E W ARD_PRO_LOY using IDOC?
Hi,
I'm now trying to add the set type and attributes to my products existing in the CRM system. I decided to use LSMW and IDOC CRMXIF_PRODUCT_MATERIAL_SAVE to maintain the set type and attributes.
I successfully maintained the categories for the products and also assigned the set type. Now I need to add the attributes for this set type, where there are 3:
LMPRODUCT_TYPE
LOYPRODUCT_UNIT
LMPRODUCT_VALUE
But because in the IDOC structure only one attribute can be maintained at one time, how can I input all those 3 attributes together? Thanks a lot.I tried to insert one data field first then update it by the second attributes, but then the system assigned two separated lines of data to my set type....
-
How do I design a Process for resizing multiple files for Premiere Elements
Hi
I am trying to understand how best to resize my slide shows of still photos to export to Premiere Elements, to reduce errors in rendering, as advised on a separate discussion.
I understand I should reduce the resolution to something like the PE Frame Size, 720 by 576 for UK PAL.
I cannot do this on Files with pan and zoom
So I think this is what I do
Export a Collection to a file.
Resize all files in the folder to a new folder using the Process Multiple files command
On trying that I have the following questions
If I do it this way, the files in portrait orientation don't correctly resize to the size I want, so what do I do with a folder of mixed orientations? Do I do two passes, or rotate the Photos, or something else?
Now do I now have to reimport all these photos (the resized collection) into the Catalogue, create a new Collection, and then apply zooms in my Slide Show creation of this Collection. I really want to retain the original photos for printing quality so don't really want to take the originals out of the Catalogue. I will end up doubling the size of my catalogue?
Will the pan/zoom ones cause a problem to render in PE?
Thanks
ChrisI have PEv.8 on my machine now, but it is probably the same in v.5
In Editor, go to File>Process multiple files. In the dialog, on the right under "Labels" you should find "Watermark".
An alternative is to make a brush containing the information which you wish to impart. With a brush you can place it precisely in a locus that you desire, but this would be labor intensive for 400 photos. The brush would be retained among the other brushes, and it could be used at any time. -
Querying XML Column in SQL to get all attributes for a element
I have data in a XML column that is formatted as such:
<TestTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MTouch TabKey="20" Priority="0">
<MMouse MouseKey="21" Priority="0" /> </MTouch>
<MTouch TabKey="11" Priority="1" />
<MTouch TabKey="14" Priority="2" />
<MTouch TabKey="17" Priority="3" />
<MTouch TabKey="23" Priority="4">
<MCategories CatKey="8" Priority="0" />
<MMouse MouseKey="27" Priority="1" />
<MMouse MouseKey="30" Priority="2" />
<MMouse MouseKey="26" Priority="3" />
<MCategories CatKey="9" Priority="4" />
<MGroups GroupKey="3" Priority="5" />
<MMouse MouseKey="28" Priority="6" />
<MCategories CatKey="7" Priority="7" />
<MMouse MouseKey="29" Priority="8" />
</MTouch>
<MTouch TabKey="6" Priority="5">
</MTouch>
</TestTemplate>
In my query I am getting the following results :
ElementName
AttributeName
TabKey
CategoryKey
MTouch
MCategories
6
7
MTouch
MCategories
6
8
MTouch
MCategories
6
9
MTouch
MCategories
11
7
MTouch
MCategories
11
8
MTouch
MCategories
11
9
MTouch
MCategories
14
7
MTouch
MCategories
14
8
MTouch
MCategories
14
9
MTouch
MCategories
17
7
MTouch
MCategories
17
8
MTouch
MCategories
17
9
MTouch
MCategories
20
7
MTouch
MCategories
20
8
MTouch
MCategories
20
9
MTouch
MCategories
23
7
MTouch
MCategories
23
8
MTouch
MCategories
23
9
This is my query:
SELECT DISTINCT
'MTouch' AS ElementName,
'MCategories' AS AttributeName,
n.y.value('@TabKey', 'int') AS TabKey,
e.y.value('@CatKey', 'int') AS CategoryKey
FROM TXML cross apply tablename.columnname.nodes('//TestTemplate//MTouch//MCategories') AS e(y)
cross apply tablename.collumnname.nodes('//TestTemplate//MTouch') AS n(y)
I would like my results to show only the catkey attribute value to show only for MTouch TabKey 23. I need help on how to write the query. Below is the result I am looking for. Notice the Categorykey column is null for all except where
the Element Name of MTouch has a TabKey value of 23.
ElementName
AttributeName
TabKey
TouchPriority
CategoryKey
MTouch
MCategories
6
5
MTouch
MCategories
11
1
MTouch
MCategories
14
2
MTouch
MCategories
17
3
MTouch
MCategories
20
0
MTouch
MCategories
23
4
7
MTouch
MCategories
23
4
8
MTouch
MCategories
23
4
9
Thanks in advance
As per the this explanation
I would like my results to show only the catkey attribute value to show only for MTouch TabKey 23
it should be this
select
t.u.value('@TabKey[1]','int') AS tabKey,
t.u.value('@Priority[1]','int') AS Priority,
m.n.value('@CatKey[1]','int')
from @x.nodes('/TestTemplate/MTouch')t(u)
outer apply u.nodes('.[@TabKey="23"]/MCategories')m(n)
ORDER BY 1,3
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How do I install multiple languages for Photoshop Elements 12
How do I install 2 languages on Adobe Photoshop Elements 12 so that my father can use it in Spanish and if he needs help, I cans switch it to English? Windows version.
In photoshop cs2 record the spell check action:
1. Create a new document and type a word you know is misspelled
2. Go to Window>Actions
3. At the bottom of the actions palette press the Create New Set button
4. At the bottom of the actions palette press the Create New Action button
5. Press Record, go to Edit>Check Spelling, press Done on the spell check dialog and click on the Stop Recording button at the bottom of the actions palette
6. Save your action set to somewhere like your desktop using the Save Actions from the actions palette fly-out menu.
In the photoshop elements 12 editor in the Expert mode
1. Go to window>Actions and load the spell check action from the fly-out menu on the actions panel
2. Click on the name of the action (not the name of the action set) and press Play to play the action.
The check spelling action should work in pse 12 just as check spelling does in photoshop cs2 -
How to send multiple data for a single element
Hi All,
I have a requirement where I have to send multiple data for single element per single transaction. For example
Id details
1 abcd
1 efgh
1 def
Now, when I am selecting this ID from database, I have to get all the details in a single xsd like
<id>1</id>
---><details>abcd</details>
<details>efgh</details>
<details>def</details>
ThanksHi,
The following XSLT...
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:variable name="root" select="/"/>
<root>
<xsl:for-each select="distinct-values(/root/entry/id)">
<xsl:variable name="id" select="."/>
<entry>
<id><xsl:value-of select="$id"/></id>
<xsl:for-each select="$root/root/entry[id = $id]">
<details><xsl:value-of select="details"/></details>
</xsl:for-each>
</entry>
</xsl:for-each>
</root>
</xsl:template>
</xsl:stylesheet>Will work for a document like this...
<root>
<entry>
<id>1</id>
<details>detail1</details>
</entry>
<entry>
<id>1</id>
<details>detail2</details>
</entry>
<entry>
<id>2</id>
<details>detail3</details>
</entry>
</root>Hope this helps...
Cheers,
Vlad -
Htmldb_item.checkbox : multiple attributes
Hi,
I was wondering if there is a way to specify multiple attributes for a checkbox using htmldb_item.checkbox
I would like the checkbx to be checked and disabled.
In the sttribute param. I can specify 'CHECKED" or 'DISABLED'. I would like to specify both
any helpHi Tyler,
Here is the example:
Table 1.
Issues Table:
issue id, issue_Description
Projects:
project id, Description
Project_issues:
project id, issue id, issue encountered(Y/N)
I want to display read only checkboxes.
issues decription is stored in Issues Table, and values (Y/N) are stored in Project_issues
So for a particular project I would like to see list of all issues(checkboxes)
This is how it looks like
For projectid: p1
issues 1 (CB) (X)
issue 2(CB)
These are diisabled or read only.
any idea how should i use check boxes in html db. I tried creating LOV
select issue_description d, issue_id r
from issuees;
This lov display checkboxes. But How Can i get values of these checkboxes from table project _issues.
thanks a lot for your help -
Multiple qualifications for single personal number
Hi
I have data source i am getting Pernr is character and qualification is attribute ( as text) . now i want to see multi ple qualification for single pernr.
so i can open Pernr and open attribute qualification and giving compounding as pernr?
will be the solutionHi Suneel,
Definitely u cannot maintain multiple attributes for different qualifications.Question for you does any employee have multiple qualifications at same time- Say Employee 1000 can do BSc and BE at the same time?.If this is the case, then you need to do compounding .If not, Make qualification as time dependent and system will not treat multiple qualifications of an employee as duplicate records.
Eg: Employee Qualification StartDate EndDate
1000 BE 01.01.2004 31.12.2008
1000 MBA 05.01.2009 31.12.2009
System will accept multiple qualifications while loading even without compounding and the same can be displayed in report.Hoep this helps!
Regards
Chandu -
Multiple values for an attribute ?
Is it possible to accept multiple values for the same attribute ?
(such as a multi-select list, like Portal perspectives)
ThanksIs it possible to accept multiple values for the same attribute ?
(such as a multi-select list, like Portal perspectives)
Thanks -
Trying to modify two AD User attributes for multiple users?
Hello,
I'm a newbie to Powershell and need some help.
I have a 2008 R2 AD and need to modify two attributes for multiple users.
The attributes include "homeDirectory" and "unixhomedirectory".
I have started to go through Powershell in a month of lunches but need this solution quickly.
I have been trying number of scripts that I cannot get to work in our test AD lab.
Is there anyone who can help with a simple script with explanations of each line so I know how it works please?
helpThanks clayman2,
Here is what's in my .csv below
samaccountName
homdedirectory
unixhomedirectory
testuser1
\\servername\oldhimedir\%username%
\\servername\oldhimedir\%username%
testuser2
\\servername\oldhimedir\%username%
\\servername\oldhimedir\%username%
This is the code below I'm trying to use.
Import-Module ActiveDirectory
$USERS = Import-CSV c:\users.csv
$USERS|Foreach{Set-ADUSer -Identity $_.samaccountname -homdedirectory $_.\\servername\oldhimedir\%username% -unixhomedirectory $_.\\servername\oldhimedir\%username%}
Please let me know if I have to put the pathing in any special brackets to have PS read it. I have tried {} around the field but I get "Missing property name after reference operator"
Thank you -
How to get ACS3.2 to assign different attributes for multiples NAS's
We are running ACS3.2 and have 3 different types of NAS for each group of users (two managed dial solutions and 1 home grown VPN concentrator solution).
The problem is that the two dialup NAS's require different RADIUS attributes for the IP address assignment: one NAS uses a named pool, the other NAS assigns the pool based on an IP entry in attribute 8 (framed IP address). Users mapped to one ACS group must be able to use both dial services.
Is it possible to configure ACS so that one type of attribute is used for one NAS and another type of attribute for the other for users belonging to the same group?
Thanks,
MattHmm, I thought you might say that:(
I've done a bit of jiggery pokery and will be doing some testing tomorrow.
I'll post back to this forum to let you know how it goes.
Matt
Maybe you are looking for
-
I need to find or create a file converter from the different Universal formats to another ASCII format. Does anyone know where I can get formating information about UFFs? Has anyone done this? Thanks in advance.
-
HT1688 How long does it take for an iphone to master reset?
I performed a reset this morning to clear my phone of all data and info. Its been four hours and my phone continues to show a black screen and in the middle there is a wheen spinning. Im just curious as to if I have totally messed my phone up or if i
-
How long does it take to install the new iphone update, my iphone is been stuck at the same % for over a hour.
-
A beta version is supposed to be installed on the computer and this needs to be uninstalled before I can install Photoshop CC. There is no such installation present, could it be some configuration or setting that should be removed?
-
Sequence settings should match output settings
My friend has sent me a project to edit. with this sequence setting. i tried many output settings but the quality is bad. i want to know what output settings shall i use for it. Thanks In Advance