473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

xml duplicated field name

Hi,

I am wondering if it alright to have duplicate attribute name in an
xml file. As you can see below, there is an attribute called
<FieldNote>, then another one at the bottom. Besides, you can see the
2nd FieldNote attribute doesn't have an open tag, does this file looks
right at all?
<AuditType>2</AuditType>

<FieldNote>0</FieldNote>

<Date>2/1/2008</Date>
<EventID>149406</EventID>
<EventType>2</EventType>
<FieldName>Approval</FieldName>

<FieldNote />

Thanks in advance. Your advice would be greatly appreciated.
Jun 27 '08 #1
7 1971
sw**********@yahoo.com wrote:
Hi,

I am wondering if it alright to have duplicate attribute name in an
xml file. As you can see below, there is an attribute called
<FieldNote>, then another one at the bottom. Besides, you can see the
2nd FieldNote attribute doesn't have an open tag, does this file looks
right at all?
<AuditType>2</AuditType>

<FieldNote>0</FieldNote>

<Date>2/1/2008</Date>
<EventID>149406</EventID>
<EventType>2</EventType>
<FieldName>Approval</FieldName>

<FieldNote />
You have two _elements_ of the name FieldNote. That is allowed. You
can't have two _attributes_ of the same name on the same element however
e.g.
<foo FieldNote="bar" FieldNote="baz"/>
is not allowed.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 27 '08 #2
On Jun 12, 10:37*am, Martin Honnen <mahotr...@yahoo.dewrote:
sweetpota...@yahoo.com wrote:
Hi,
I am wondering if it alright to have duplicate attribute name in an
xml file. As you can see below, there is an attribute called
<FieldNote>, then another one at the bottom. Besides, you can see the
2nd FieldNote attribute doesn't have an open tag, does this file looks
right at all?
* <AuditType>2</AuditType>
* <FieldNote>0</FieldNote>
* <Date>2/1/2008</Date>
* <EventID>149406</EventID>
* <EventType>2</EventType>
* <FieldName>Approval</FieldName>
* <FieldNote />

You have two _elements_ of the name FieldNote. That is allowed. You
can't have two _attributes_ of the same name on the same element however
e.g.
* *<foo FieldNote="bar" FieldNote="baz"/>
is not allowed.

--

* * * * Martin Honnen
* * * *http://JavaScript.FAQTs.com/- Hide quoted text -

- Show quoted text -
Thanks, how about the 2nd elements without the open tag? i.e. with
just <FieldNote />, but not <FieldNote><FieldNote />

Thanks
Jun 27 '08 #3
just <FieldNote />, but not <FieldNote><FieldNote />

http://www.w3.org/TR/REC-xml/#NT-EmptyElemTag
Jun 27 '08 #4
sw**********@yahoo.com wrote:
Thanks, how about the 2nd elements without the open tag? i.e. with
just <FieldNote />, but not <FieldNote><FieldNote />
Sorry, I don't understand what you are asking now.
<FieldNote><FieldNote />
does not make sense, you either need
<FieldNote></FieldNote>
or
<FieldNote><FieldNote /></FieldNote>
where the first is an empty FieldNote element and the second is a
FieldNote element that has one child node, a second FieldNote element.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 27 '08 #5
On Jun 12, 10:58*am, Martin Honnen <mahotr...@yahoo.dewrote:
sweetpota...@yahoo.com wrote:
Thanks, how about the 2nd elements without the open tag? i.e. with
just <FieldNote />, but not <FieldNote><FieldNote />

Sorry, I don't understand what you are asking now.
* *<FieldNote><FieldNote />
does not make sense, you either need
* *<FieldNote></FieldNote>
or
* *<FieldNote><FieldNote /></FieldNote>
where the first is an empty FieldNote element and the second is a
FieldNote element that has one child node, a second FieldNote element.

--

* * * * Martin Honnen
* * * *http://JavaScript.FAQTs.com/
Alright, by looking at

<FieldNote>0</FieldNote>
<Date>2/1/2008</Date>
<EventID>149406</EventID>
<EventType>2</EventType>
<FieldName>Approval</FieldName>
<FieldNote />
<NewValue>1</NewValue>

The first FieldNote has a value of "0"
How about the 2nd one? what does <FieldNote /mean?

Thanks in advance.
Jun 27 '08 #6
sw**********@yahoo.com wrote:
<FieldNote>0</FieldNote>
<Date>2/1/2008</Date>
<EventID>149406</EventID>
<EventType>2</EventType>
<FieldName>Approval</FieldName>
<FieldNote />
<NewValue>1</NewValue>

The first FieldNote has a value of "0"
How about the 2nd one? what does <FieldNote /mean?
<FieldNote /is a short form of <FieldNote></FieldNote>, it is an empty
FieldNode element.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 27 '08 #7
sw**********@yahoo.com wrote:
On Jun 12, 10:58 am, Martin Honnen <mahotr...@yahoo.dewrote:
>sweetpota...@yahoo.com wrote:
>>Thanks, how about the 2nd elements without the open tag? i.e. with
just <FieldNote />, but not <FieldNote><FieldNote />
Sorry, I don't understand what you are asking now.
<FieldNote><FieldNote />
does not make sense, you either need
<FieldNote></FieldNote>
or
<FieldNote><FieldNote /></FieldNote>
where the first is an empty FieldNote element and the second is a
FieldNote element that has one child node, a second FieldNote element.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Alright, by looking at

<FieldNote>0</FieldNote>
<Date>2/1/2008</Date>
<EventID>149406</EventID>
<EventType>2</EventType>
<FieldName>Approval</FieldName>
<FieldNote />
<NewValue>1</NewValue>

The first FieldNote has a value of "0"
How about the 2nd one? what does <FieldNote /mean?
In terms of markup, it means the element is present but it has no value.

What it means in terms of your business process is a question only you
can answer.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michelle | last post by:
hi, i have created an array from recordset containing user names eg. (davidp, davidp, evenf, patricka, rebeccah) which i have sorted in alphabetical order, but i need to identify duplicates...
7
by: Amy | last post by:
I'm trying to add an autoincrementing id to a table based on an existing field Name, but Name has duplicated records. How can I do that in ACCESS? Thanks. Amy
1
by: Sachin | last post by:
Lets say I have following event handler private void PrintDocument_PrintPage(Object sender, PrintPageEventArgs e) { /// some code } If I open a watch window on "sender" or on "e", some of the...
1
by: Eych | last post by:
I have a field which I do not want to put in the Group Header, but keep in the Details section. I selected 'Suppress if duplicated', but it still duplicates. Here's an example: What I want to...
0
by: awrigley | last post by:
Hi An app that was chuntering away quite happily to itself had roles added to it. Just two: Admins and Subscribers. However, I seem to have mucked up when assigning the role provider in the...
2
by: keisha | last post by:
I have a access database. I have a form that as a field that i need to check to make sure is not been duplicated. Possible validation required? The field data type is number so the user have to input...
5
MattFitzgerald
by: MattFitzgerald | last post by:
Can you help I want to reduce the number of queries I use? I have a union query which combines data from 2 different databases located at different sites. Both databases are identical each of...
1
by: jan.geek | last post by:
Hi all, When reading the following ugly but valid (according to w3c XSV) xsd into a DataSet I get "Duplicated declaration PossiblesValue" error. Can anyone tell me why? This is a small part...
3
by: ryadav | last post by:
Hi I really hope someone can help me, I am working on a report and I chose "Suppress if Duplicated" for one of my fields, I got blanks in that field on some of the rows. How do I tell crystal not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.