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

XElement Question

I have an `XElement` and an `XPath` expression that selects a node from it. It works fine in the original program that I wrote it in but doesnt work if I paste it to another program. I've checked the references and import statements. What am i doing wrong?

I think the problem might be that the original program had the code within the class of a wpf window while it was moved to a abstract class where it doesnt work.

Dim X As XElement = _
<ModelVisual3D x:Name="World" mlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
>
<ModelVisual3D x:Name="AmbientLightContainer">
<ModelVisual3D.Content>
<AmbientLight x:Name="AmbientLight" Color="#FF7F7F7F"/>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D x:Name="DefaultGroup">
<ModelVisual3D.Content>
<GeometryModel3D x:Name="Suzanne" d:Bounds="-1.36718797683716,-0.851562976837158,-0.984375,2.73437595367432,1.70312595367432,1.96875 ">
<GeometryModel3D.Geometry>
<MeshGeometry3D Positions="0.46875,0.75781298,-0.24218801 0.4375,0.765625,-0.16406301 0.5,0.6875,-0.09375 0.5625,0.671875,-0.24218801 -0.5,0.6875,-0.09375 -0.4375,0.765625,-0.16406301 -0.46875,0.75781298,-0.24218801 -0.5625,0.671875,-0.24218801 0.546875,0.578125,-0.054687999 0.625,0.5625,-0.24218801 -0.546875,0.578125,-0.054687999 -0.625,0.5625,-0.24218801 0.35156301,0.71875,-0.03125
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<DiffuseMaterial Brush="#FFFFFFFF"/>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
<ModelVisual3D.Transform>
<Transform3DGroup>
<TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
<ScaleTransform3D ScaleX="1" ScaleY="1" ScaleZ="1"/>
<RotateTransform3D d:EulerAngles="0,0,0"/>
</Transform3DGroup>
</ModelVisual3D.Transform>
</ModelVisual3D>
</ModelVisual3D>

Dim XPath As String

XPath = "//Transform3DGroup"

X.XPathSelectElement(XPath).Remove()

Console.WriteLine(X.ToString)
Feb 1 '10 #1
0 1003

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

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
2
by: Mike N. | last post by:
hello all: I am using LINQ to XML, but I think this issue is more widespread, here's an example of what I am trying to do: Dim testurl As String = "http://stats.enemyterritory.com/profile/...
0
by: Andy B | last post by:
I have a CheckBoxList that I want to dataBind to an XElement. I got this far: CheckBoxLisgt.DataSource = StockContract.Element("Glossary").Elements("Term"); CheckBoxList.DataBind(); It works...
4
by: Rory Becker | last post by:
Is there a way to do something like the following... ------------------------------------------------------------- Dim x As String =...
11
by: Michael Bray | last post by:
I'm playing around with XElement stuff, and I've come across a difficulty. The XML document that I'm reading contains an xmlns declaration on the main node... <root xmlns="http://www.me.com">...
0
by: John Meyer | last post by:
I'm going through the documentation help about using XElement and I'm finding no help with going through the elements as a recordset. here's an example of the return results I am getting through...
4
by: standerby | last post by:
I am writing a XML file suing XElement. How can I output a file like the following? I got an exception if if I use ':' in the element name or attribute name. Thanks, <?xml version="1.0"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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,...

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.