I'm sure there's a very weasy way to do this, I've been running hard and
fast on several things at once and just may be at the point of overthinking
this...
I receive an incoming XML document via a string feed within a web service:
<Root>
<Product>
<File>Order</File>
<Origin>OregonOffice</Origin>
<Details Name="Product" Value="Binder" />
<Details Name="Qty" Value="1" />
</Product>
</Root>
I need to modify the outgoing XML to read the status of an approval check:
<Root>
<Product>
<File>Order</File>
<Origin>OregonOffice</Origin>
<Details Name="Product" Value="Binder" />
<Details Name="Qty" Value="1" />
<Details Name="Approved" Value="False" />
</Product>
</Root>
Once I have the True or False value from a method call, how would I modify
the XML to add the new attributes?
TIA
-Rich 10 2616
dim dom as new XmlDocumen
dom.loadxml(yourxmlstring
dim products as XmlNodeList = dom.selectnodes("descendant::product"
For each product as XmlNode in Product
dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag here. for each produc
dim tmpNode as XmlNode = dom.CreateElement("Details"
dim xAtt as XmlAttribute = dom.CreateAttribute("Name"
xatt.value = "Approved
tmpNode.attributes.append(xatt
'repeat above to add more attribute
product.appendchild tmpnod
Nex
----- Rich Wallace wrote: ----
I'm sure there's a very weasy way to do this, I've been running hard an
fast on several things at once and just may be at the point of overthinkin
this..
I receive an incoming XML document via a string feed within a web service
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root
I need to modify the outgoing XML to read the status of an approval check
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details Name="Approved" Value="False" /></Product></Root
Once I have the True or False value from a method call, how would I modif
the XML to add the new attributes
TI
-Ric
dim dom as new XmlDocumen
dom.loadxml(yourxmlstring
dim products as XmlNodeList = dom.selectnodes("descendant::product"
For each product as XmlNode in Product
dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag here. for each produc
dim tmpNode as XmlNode = dom.CreateElement("Details"
dim xAtt as XmlAttribute = dom.CreateAttribute("Name"
xatt.value = "Approved
tmpNode.attributes.append(xatt
'repeat above to add more attribute
product.appendchild tmpnod
Nex
----- Rich Wallace wrote: ----
I'm sure there's a very weasy way to do this, I've been running hard an
fast on several things at once and just may be at the point of overthinkin
this..
I receive an incoming XML document via a string feed within a web service
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root
I need to modify the outgoing XML to read the status of an approval check
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details Name="Approved" Value="False" /></Product></Root
Once I have the True or False value from a method call, how would I modif
the XML to add the new attributes
TI
-Ric
Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it in an
exact spot?
I.e:
<Root>
<Product>
<File>Order</File>
<Origin>OregonOffice</Origin>
<Details Name="Product" Value="Binder" />
<Details Name="Qty" Value="1" /> -- I want to make sure I place my new
line after the Qty and before Mfr
<Details Name="Mfr" Value="ABC Co." />
</Product>
</Root>
Thanks again.
-r
"tMan" <an*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com... dim dom as new XmlDocument dom.loadxml(yourxmlstring) dim products as XmlNodeList = dom.selectnodes("descendant::product")
For each product as XmlNode in Products dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag
here. for each product dim tmpNode as XmlNode = dom.CreateElement("Details") dim xAtt as XmlAttribute = dom.CreateAttribute("Name") xatt.value = "Approved" tmpNode.attributes.append(xatt)
'repeat above to add more attributes
product.appendchild tmpnode
Next ----- Rich Wallace wrote: -----
I'm sure there's a very weasy way to do this, I've been running hard
and fast on several things at once and just may be at the point of
overthinking this...
I receive an incoming XML document via a string feed within a web
service:
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details
Name="Product" Value="Binder" /><Details Name="Qty" Value="1"
/></Product></Root> I need to modify the outgoing XML to read the status of an approval
check:
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details
Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details
Name="Approved" Value="False" /></Product></Root> Once I have the True or False value from a method call, how would I
modify the XML to add the new attributes?
TIA -Rich
Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it in an
exact spot?
I.e:
<Root>
<Product>
<File>Order</File>
<Origin>OregonOffice</Origin>
<Details Name="Product" Value="Binder" />
<Details Name="Qty" Value="1" /> -- I want to make sure I place my new
line after the Qty and before Mfr
<Details Name="Mfr" Value="ABC Co." />
</Product>
</Root>
Thanks again.
-r
"tMan" <an*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com... dim dom as new XmlDocument dom.loadxml(yourxmlstring) dim products as XmlNodeList = dom.selectnodes("descendant::product")
For each product as XmlNode in Products dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag
here. for each product dim tmpNode as XmlNode = dom.CreateElement("Details") dim xAtt as XmlAttribute = dom.CreateAttribute("Name") xatt.value = "Approved" tmpNode.attributes.append(xatt)
'repeat above to add more attributes
product.appendchild tmpnode
Next ----- Rich Wallace wrote: -----
I'm sure there's a very weasy way to do this, I've been running hard
and fast on several things at once and just may be at the point of
overthinking this...
I receive an incoming XML document via a string feed within a web
service:
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details
Name="Product" Value="Binder" /><Details Name="Qty" Value="1"
/></Product></Root> I need to modify the outgoing XML to read the status of an approval
check:
<Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details
Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details
Name="Approved" Value="False" /></Product></Root> Once I have the True or False value from a method call, how would I
modify the XML to add the new attributes?
TIA -Rich
Can anybody assist? I'm not sure where to look in MSDN or online help, I
can't seem to find what I'm looking for.
"Rich Wallace" <ri**********@minusthecannedmeat.jfsheadotcom> wrote in
message news:OP**************@tk2msftngp13.phx.gbl... Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it in an exact spot?
I.e: <Root> <Product> <File>Order</File> <Origin>OregonOffice</Origin> <Details Name="Product" Value="Binder" /> <Details Name="Qty" Value="1" /> -- I want to make sure I place my
new line after the Qty and before Mfr <Details Name="Mfr" Value="ABC Co." /> </Product> </Root>
Thanks again. -r
"tMan" <an*******@discussions.microsoft.com> wrote in message news:9D**********************************@microsof t.com... dim dom as new XmlDocument dom.loadxml(yourxmlstring) dim products as XmlNodeList = dom.selectnodes("descendant::product")
For each product as XmlNode in Products dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag here. for each product dim tmpNode as XmlNode = dom.CreateElement("Details") dim xAtt as XmlAttribute = dom.CreateAttribute("Name") xatt.value = "Approved" tmpNode.attributes.append(xatt)
'repeat above to add more attributes
product.appendchild tmpnode
Next ----- Rich Wallace wrote: -----
I'm sure there's a very weasy way to do this, I've been running
hard and fast on several things at once and just may be at the point of overthinking this...
I receive an incoming XML document via a string feed within a web service: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root> I need to modify the outgoing XML to read the status of an approval
check: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details Name="Approved" Value="False" /></Product></Root> Once I have the True or False value from a method call, how would I
modify the XML to add the new attributes?
TIA -Rich
Can anybody assist? I'm not sure where to look in MSDN or online help, I
can't seem to find what I'm looking for.
"Rich Wallace" <ri**********@minusthecannedmeat.jfsheadotcom> wrote in
message news:OP**************@tk2msftngp13.phx.gbl... Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it in an exact spot?
I.e: <Root> <Product> <File>Order</File> <Origin>OregonOffice</Origin> <Details Name="Product" Value="Binder" /> <Details Name="Qty" Value="1" /> -- I want to make sure I place my
new line after the Qty and before Mfr <Details Name="Mfr" Value="ABC Co." /> </Product> </Root>
Thanks again. -r
"tMan" <an*******@discussions.microsoft.com> wrote in message news:9D**********************************@microsof t.com... dim dom as new XmlDocument dom.loadxml(yourxmlstring) dim products as XmlNodeList = dom.selectnodes("descendant::product")
For each product as XmlNode in Products dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag here. for each product dim tmpNode as XmlNode = dom.CreateElement("Details") dim xAtt as XmlAttribute = dom.CreateAttribute("Name") xatt.value = "Approved" tmpNode.attributes.append(xatt)
'repeat above to add more attributes
product.appendchild tmpnode
Next ----- Rich Wallace wrote: -----
I'm sure there's a very weasy way to do this, I've been running
hard and fast on several things at once and just may be at the point of overthinking this...
I receive an incoming XML document via a string feed within a web service: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root> I need to modify the outgoing XML to read the status of an approval
check: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details Name="Approved" Value="False" /></Product></Root> Once I have the True or False value from a method call, how would I
modify the XML to add the new attributes?
TIA -Rich
Rich:
in xml, the order of the child nodes (or attributes of a node) does not really matter. (atleast it shouldn't)
you can use the prependchild() method to append a child as a first child to a node.
google for more samples if you absolutely have to have the node at a particular position.
"Rich Wallace" wrote: Can anybody assist? I'm not sure where to look in MSDN or online help, I can't seem to find what I'm looking for.
"Rich Wallace" <ri**********@minusthecannedmeat.jfsheadotcom> wrote in message news:OP**************@tk2msftngp13.phx.gbl... Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it in an exact spot?
I.e: <Root> <Product> <File>Order</File> <Origin>OregonOffice</Origin> <Details Name="Product" Value="Binder" /> <Details Name="Qty" Value="1" /> -- I want to make sure I place my new line after the Qty and before Mfr <Details Name="Mfr" Value="ABC Co." /> </Product> </Root>
Thanks again. -r
"tMan" <an*******@discussions.microsoft.com> wrote in message news:9D**********************************@microsof t.com... dim dom as new XmlDocument dom.loadxml(yourxmlstring) dim products as XmlNodeList = dom.selectnodes("descendant::product")
For each product as XmlNode in Products dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag here. for each product dim tmpNode as XmlNode = dom.CreateElement("Details") dim xAtt as XmlAttribute = dom.CreateAttribute("Name") xatt.value = "Approved" tmpNode.attributes.append(xatt)
'repeat above to add more attributes
product.appendchild tmpnode
Next ----- Rich Wallace wrote: -----
I'm sure there's a very weasy way to do this, I've been running hard and fast on several things at once and just may be at the point of overthinking this...
I receive an incoming XML document via a string feed within a web service: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root> I need to modify the outgoing XML to read the status of an approval
check: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details Name="Approved" Value="False" /></Product></Root> Once I have the True or False value from a method call, how would I
modify the XML to add the new attributes?
TIA -Rich
Rich:
in xml, the order of the child nodes (or attributes of a node) does not really matter. (atleast it shouldn't)
you can use the prependchild() method to append a child as a first child to a node.
google for more samples if you absolutely have to have the node at a particular position.
"Rich Wallace" wrote: Can anybody assist? I'm not sure where to look in MSDN or online help, I can't seem to find what I'm looking for.
"Rich Wallace" <ri**********@minusthecannedmeat.jfsheadotcom> wrote in message news:OP**************@tk2msftngp13.phx.gbl... Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it in an exact spot?
I.e: <Root> <Product> <File>Order</File> <Origin>OregonOffice</Origin> <Details Name="Product" Value="Binder" /> <Details Name="Qty" Value="1" /> -- I want to make sure I place my new line after the Qty and before Mfr <Details Name="Mfr" Value="ABC Co." /> </Product> </Root>
Thanks again. -r
"tMan" <an*******@discussions.microsoft.com> wrote in message news:9D**********************************@microsof t.com... dim dom as new XmlDocument dom.loadxml(yourxmlstring) dim products as XmlNodeList = dom.selectnodes("descendant::product")
For each product as XmlNode in Products dim bApproved as Boolean = GetApprovalValue() 'get your boolean flag here. for each product dim tmpNode as XmlNode = dom.CreateElement("Details") dim xAtt as XmlAttribute = dom.CreateAttribute("Name") xatt.value = "Approved" tmpNode.attributes.append(xatt)
'repeat above to add more attributes
product.appendchild tmpnode
Next ----- Rich Wallace wrote: -----
I'm sure there's a very weasy way to do this, I've been running hard and fast on several things at once and just may be at the point of overthinking this...
I receive an incoming XML document via a string feed within a web service: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root> I need to modify the outgoing XML to read the status of an approval
check: <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /><Details Name="Approved" Value="False" /></Product></Root> Once I have the True or False value from a method call, how would I
modify the XML to add the new attributes?
TIA -Rich
Thanks for the info.
"tMan" <tM**@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com... Rich: in xml, the order of the child nodes (or attributes of a node) does not
really matter. (atleast it shouldn't) you can use the prependchild() method to append a child as a first child
to a node. google for more samples if you absolutely have to have the node at a
particular position. "Rich Wallace" wrote:
Can anybody assist? I'm not sure where to look in MSDN or online help,
I can't seem to find what I'm looking for.
"Rich Wallace" <ri**********@minusthecannedmeat.jfsheadotcom> wrote in message news:OP**************@tk2msftngp13.phx.gbl... Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it
in an exact spot?
I.e: <Root> <Product> <File>Order</File> <Origin>OregonOffice</Origin> <Details Name="Product" Value="Binder" /> <Details Name="Qty" Value="1" /> -- I want to make sure I place
my new line after the Qty and before Mfr <Details Name="Mfr" Value="ABC Co." /> </Product> </Root>
Thanks again. -r
"tMan" <an*******@discussions.microsoft.com> wrote in message news:9D**********************************@microsof t.com... > dim dom as new XmlDocument > dom.loadxml(yourxmlstring) > dim products as XmlNodeList = dom.selectnodes("descendant::product") > > For each product as XmlNode in Products > dim bApproved as Boolean = GetApprovalValue() 'get your boolean
flag here. for each product > dim tmpNode as XmlNode = dom.CreateElement("Details") > dim xAtt as XmlAttribute = dom.CreateAttribute("Name") > xatt.value = "Approved" > tmpNode.attributes.append(xatt) > > 'repeat above to add more attributes > > product.appendchild tmpnode > > Next > > > > ----- Rich Wallace wrote: ----- > > I'm sure there's a very weasy way to do this, I've been running hard and > fast on several things at once and just may be at the point of overthinking > this... > > I receive an incoming XML document via a string feed within a
web service: > > <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root> > > I need to modify the outgoing XML to read the status of an
approval check: > > <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1"
/><Details Name="Approved" Value="False" /></Product></Root> > > Once I have the True or False value from a method call, how
would I modify > the XML to add the new attributes? > > TIA > -Rich > > >
Thanks for the info.
"tMan" <tM**@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com... Rich: in xml, the order of the child nodes (or attributes of a node) does not
really matter. (atleast it shouldn't) you can use the prependchild() method to append a child as a first child
to a node. google for more samples if you absolutely have to have the node at a
particular position. "Rich Wallace" wrote:
Can anybody assist? I'm not sure where to look in MSDN or online help,
I can't seem to find what I'm looking for.
"Rich Wallace" <ri**********@minusthecannedmeat.jfsheadotcom> wrote in message news:OP**************@tk2msftngp13.phx.gbl... Works, thank you.
Is there a way to nivagiate through the doc and make sure I place it
in an exact spot?
I.e: <Root> <Product> <File>Order</File> <Origin>OregonOffice</Origin> <Details Name="Product" Value="Binder" /> <Details Name="Qty" Value="1" /> -- I want to make sure I place
my new line after the Qty and before Mfr <Details Name="Mfr" Value="ABC Co." /> </Product> </Root>
Thanks again. -r
"tMan" <an*******@discussions.microsoft.com> wrote in message news:9D**********************************@microsof t.com... > dim dom as new XmlDocument > dom.loadxml(yourxmlstring) > dim products as XmlNodeList = dom.selectnodes("descendant::product") > > For each product as XmlNode in Products > dim bApproved as Boolean = GetApprovalValue() 'get your boolean
flag here. for each product > dim tmpNode as XmlNode = dom.CreateElement("Details") > dim xAtt as XmlAttribute = dom.CreateAttribute("Name") > xatt.value = "Approved" > tmpNode.attributes.append(xatt) > > 'repeat above to add more attributes > > product.appendchild tmpnode > > Next > > > > ----- Rich Wallace wrote: ----- > > I'm sure there's a very weasy way to do this, I've been running hard and > fast on several things at once and just may be at the point of overthinking > this... > > I receive an incoming XML document via a string feed within a
web service: > > <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1" /></Product></Root> > > I need to modify the outgoing XML to read the status of an
approval check: > > <Root><Product><File>Order</File><Origin>OregonOffice</Origin><Details Name="Product" Value="Binder" /><Details Name="Qty" Value="1"
/><Details Name="Approved" Value="False" /></Product></Root> > > Once I have the True or False value from a method call, how
would I modify > the XML to add the new attributes? > > TIA > -Rich > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: waters |
last post by:
I seem to have hit a snag.
I am trying to add the list (l_local) as an item in the output list
(l_output). "l_local" is a modified copy of the format-list "l_format",
which will be updated by...
|
by: sm |
last post by:
How to "Insert" (not append) new text segment to an existing text file?
Assume that we have text file as shown below;
Elvis
Sofia
Kylix
BCB--> How to insert here?
Atten
BuilderX
Roma
|
by: Jonathan Buckland |
last post by:
Can someone give me an example how to append data without having to
load the complete XML file.
Is this possible?
Jonathan
|
by: Sven Pran |
last post by:
Probably the answer is there just in front of me only awaiting me to
discover it,
but:
1: I want to build a query that returns all records in one table for which
there is no successful "join"...
|
by: What-a-Tool |
last post by:
Remember seeing a post a while back from someone who wanted to add to a
table only if the data didn't already exist.
Someone suggested a type of query called an "Up" something or other. Can't...
|
by: Matrix |
last post by:
I want to append records in a XML file,I use XMLTextWriter,but i found it
only create a XML file,not append records in exist XML file.why?
-------------------------------------------------...
|
by: MN |
last post by:
I have to import a tab-delimited text file daily into Access through a
macro. All of the data needs to be added to an existing table. Some of
the data already exists but may be updated by the...
|
by: mpslanker |
last post by:
This is my first time posting here, so if I have made any mistakes (i.e. wrong forum area, etc) I am sorry.
I have an Access database that I have to import a text file into and append it to a...
|
by: vj |
last post by:
I am using Borland C++.
I run a program which generates output data files, say 'Voltage.dat',
'Current.dat'. I have a variable in my code (say N), and for various
values of N (for each value of...
|
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...
|
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: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |