473,790 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with element data type

I'm using MSXML 4.0 in my application and i have a problem when i try
to retrieve an attribut value with the property
IXMLDOMNode::no deTypedValue.

in my XML i have the element :
<MyElem x_date="2006-03-16T12:30:30" x_int="6"/>

If i attach an XDR document :
<AttributeTyp e name="x_date" required="yes" dt:type="dateti me" />
<AttributeTyp e name="x_int" required="yes" dt:type="number " />

In my application, if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x will be a VT_DATE and y will be a VT_I4 correctly.

My problem is when i attach and XSD :
<xs:attribute name="x_date" type="xs:date" />
<xs:attribute name="x_int" type="xs:intege r" />

if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x and y will be of type B_STR.

thanks.
Apr 14 '06 #1
3 1645
nodeTypedValue is not supported for XSD schemas.

--
Sih Huseyin Ulger
MSXML Dev
"kimono" wrote:
I'm using MSXML 4.0 in my application and i have a problem when i try
to retrieve an attribut value with the property
IXMLDOMNode::no deTypedValue.

in my XML i have the element :
<MyElem x_date="2006-03-16T12:30:30" x_int="6"/>

If i attach an XDR document :
<AttributeTyp e name="x_date" required="yes" dt:type="dateti me" />
<AttributeTyp e name="x_int" required="yes" dt:type="number " />

In my application, if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x will be a VT_DATE and y will be a VT_I4 correctly.

My problem is when i attach and XSD :
<xs:attribute name="x_date" type="xs:date" />
<xs:attribute name="x_int" type="xs:intege r" />

if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x and y will be of type B_STR.

thanks.

Apr 14 '06 #2
What can i do to have the same behavior as nodeTypedValue for xsd
schemas ?

Sih Huseyin Ulger pretended :
nodeTypedValue is not supported for XSD schemas.

--
Sih Huseyin Ulger
MSXML Dev
"kimono" wrote:
I'm using MSXML 4.0 in my application and i have a problem when i try
to retrieve an attribut value with the property
IXMLDOMNode::no deTypedValue.

in my XML i have the element :
<MyElem x_date="2006-03-16T12:30:30" x_int="6"/>

If i attach an XDR document :
<AttributeTyp e name="x_date" required="yes" dt:type="dateti me" />
<AttributeTyp e name="x_int" required="yes" dt:type="number " />

In my application, if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x will be a VT_DATE and y will be a VT_I4 correctly.

My problem is when i attach and XSD :
<xs:attribute name="x_date" type="xs:date" />
<xs:attribute name="x_int" type="xs:intege r" />

if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x and y will be of type B_STR.

thanks.

Apr 14 '06 #3
Unfortunately there is no easy way. You can write a method that figures out
the type of the node by getting schema declaration of the node
(DOMDocument->namespaces->getDeclarati on method returns ISchemaElement or
ISchemaType for a specific Node) and then using SOM to get the name of
simpleType and mapping xsd buildt in types to VARIANT supported types.
--
Sih Huseyin Ulger
MSXML Dev
"kimono" wrote:
What can i do to have the same behavior as nodeTypedValue for xsd
schemas ?

Sih Huseyin Ulger pretended :
nodeTypedValue is not supported for XSD schemas.

--
Sih Huseyin Ulger
MSXML Dev
"kimono" wrote:
I'm using MSXML 4.0 in my application and i have a problem when i try
to retrieve an attribut value with the property
IXMLDOMNode::no deTypedValue.

in my XML i have the element :
<MyElem x_date="2006-03-16T12:30:30" x_int="6"/>

If i attach an XDR document :
<AttributeTyp e name="x_date" required="yes" dt:type="dateti me" />
<AttributeTyp e name="x_int" required="yes" dt:type="number " />

In my application, if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x will be a VT_DATE and y will be a VT_I4 correctly.

My problem is when i attach and XSD :
<xs:attribute name="x_date" type="xs:date" />
<xs:attribute name="x_int" type="xs:intege r" />

if i call :
_variant_t x = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;
_variant_t y = y->attributes->getNamedItem(L "x_date")->nodeTypedValue ;

x and y will be of type B_STR.

thanks.


Apr 14 '06 #4

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

Similar topics

3
1382
by: Tjerk Wolterink | last post by:
i have xml like this: <data> <item type="a"> 1 </item> <item type="a"> 2 </item> <item type="b">
0
464
by: W. Kacy | last post by:
I am having trouble using XML in an ASP.NET 2.0 webform. Using ASP.NET 2.0 beta 2, I have created a blank web page in a C# website. I have added an XML file (soData.xml), structured as follows: <?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> <VFPData> <ac_sodata> <iono>Vendor</iono> <sodate>2004-03-04</sodate> <sono>164</sono>
6
2491
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process I've hit a snag. How do I resolve multiple external references? The transform method on a stylesheet only takes one resolver, not an array Stephen
0
1459
by: chris.millar | last post by:
I am using the ReadXMLSchema method of system.data.dataset to read a schema into a dataset. I have an XML file that I build up and wish to do a .Update against a database. The dataset doesn't have a schema and takes the following form: xml: <?xml version="1.0" encoding="utf-8"?> <DataSetEntities xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:guids="urn:schemas-microsoft-com:guids" xmlns="C:/DACXML/EntityAttribute.xsd">
1
1565
by: Mr. Almenares | last post by:
Hello: I’m trying to do a schema with recurrent structure for a Book like a Node can have many Nodes inside or One leave. So, the leaves have an attribute that is Identifier. My goal is define Uniqueness that guarantees to the attribute Identifier his uniqueness. That I don’t know the depth of levels I have to put in the xpath attribute of the selector something like this TOC/descendant::Tree/Data, but this is not allow. How I can...
10
2520
by: Ben | last post by:
Hi, I am a newbie with C and am trying to get a simple linked list working for my program. The structure of each linked list stores the char *data and *next referencing to the next link. The problem I get is that I am trying to link a struct that I have defined and its refusing to link. I have tried casting my struct into char * but attempts to cast it back to its original struct to access its contents only seg faults.
1
3432
by: leslie_tighe | last post by:
Hello, I have webservice created with Axis 1.2.1 and that I am trying to consuming in .NET (VB) using the Microsoft provided tools. While I am able to consume methods on the service that return simple type, I cannot consume methods that return complex objects. I have tried experimenting, with this, but am at a bit of loss on where the problem lies. When I call the services from a browser, I do get back the response that contains valid...
0
2373
by: ryan | last post by:
I've been tasked with consuming a Perl web service that was written by a person in a different department of my company. The problem is it's the guy's first attempt at web services and he doesn't know how to create the WDSL. I created web service with Visual Studio that mimics his service and after some tweaking of the soapAction in the WSDL I'm able to call his service successfully. When I use SOAPScope to look the messages being sent and...
1
2863
by: louis_la_brocante | last post by:
Dear all, I am having trouble generating a client proxy for a webservice whose methods return a "complex" type. The type is complex in that it is a class whose members are a mix of primitive types and of more elaborate classes implementing IXmlSerializable. The resulting WSDL file for the webservice has two separate schemas in its <types> sections, and the client proxy (generated with wsdl.exe) is missing the definitions of the...
39
19650
by: Martin Jørgensen | last post by:
Hi, I'm relatively new with C-programming and even though I've read about pointers and arrays many times, it's a topic that is a little confusing to me - at least at this moment: ---- 1) What's the difference between these 3 statements: (i) memcpy(&b, &KoefD, n); // this works somewhere in my code
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10413
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.