473,395 Members | 1,938 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,395 software developers and data experts.

About XML Node Attribute

5
how to judge a node doesn't contain one attribute
like

<?xml version="1.0" encoding="GB2312" ?>
<AutoUpdater>
<folder>
<file name="a.txt" date="2007-12-21 12:37" size="16K" />
<file name="b.rar" date="2008-1-12 20:30" />
<file name="c.doc" date="2004-7-5 19:10" size="245K" />
</folder>
</AutoUpdater>

how to know in " <file name="b.rar" date="2008-1-12 20:30" />"
there is no "size" attribute?

Please help me! Thank you very much!
Jan 28 '08 #1
1 1208
r035198x
13,262 8TB
how to judge a node doesn't contain one attribute
like

<?xml version="1.0" encoding="GB2312" ?>
<AutoUpdater>
<folder>
<file name="a.txt" date="2007-12-21 12:37" size="16K" />
<file name="b.rar" date="2008-1-12 20:30" />
<file name="c.doc" date="2004-7-5 19:10" size="245K" />
</folder>
</AutoUpdater>

how to know in " <file name="b.rar" date="2008-1-12 20:30" />"
there is no "size" attribute?

Please help me! Thank you very much!
Have a read at the example in the specs
Jan 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mr_burns | last post by:
Hi there, I dont normally use DOM XML but have been given the task of integrating it with a web site using PHP. I have to use DOM XML as this is what is provided by the server. Basically what...
1
by: CB | last post by:
I know I can select a node by attribute value using something like <xsl:apply-templates select="//*"/> How can I replace Joe with an attribute from the current node? I.e., the current node...
3
by: Andy Fish | last post by:
Hi, I just found this template in someone else's xslt (it's Microsoft's "word2html" stylesheet to convert WordProcessingML to HTML) <xsl:template match="WX:sect"> <xsl:variable...
2
by: nkunapa | last post by:
Hi: Is there a way in XPATH to find the nearest node of the node in context with a certain attribute value. Here is my problem. I have the following XML and I am trying to add all the nodes with...
1
by: John Wilhelm | last post by:
I'm having a problem in by VB.net 2005 application. When i try to get a node from my app.config file the node come back with "nothing". The xmldocment loads OK, but I can't retrive a node. The...
2
by: RichardHatcher.com | last post by:
I am writing C code using xpath to extract some data from a XML document. The file uses namespaces, but the name spaces are all listed in the root node of the file as attributes. I want to...
1
by: Tedros.G | last post by:
Hi I have an attribute the appears in both the root node and child node for example, below the attribute VERSION appears in the rood node (PRODMSG ) and a child node (OPERATION ) ================...
0
by: Gregg | last post by:
Hello; I have the below XML schema which I'm trying to iterate through node by node. The script I'm using is also shown below. The resulting output, also shown below, shows that I'm not...
35
by: RobG | last post by:
Seems developers of mobile applications are pretty much devoted to UA sniffing: <URL: http://wurfl.sourceforge.net/vodafonerant/index.htm > -- Rob
1
by: SWETA123 | last post by:
I will very helpful to you if you can help me out in my below problem. I am not getting idea what should be the right approach for this. Here is my problem. I have below (sample)xml. <Rules>...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.